How to setup custom domain on firebase hosting
How to setup custom domain on firebase hosting
Since I set up a custom domain for Firebase hosting, I wanted to reduce the burden of looking up your information as much as possible, so I wrote down how to do it.
The Firebase hosting configuration is a general one, so I will start from the point where the hosting configuration is complete.
Go to your Firebase console and hosting page.
You can find this button and push this.
A popup like this:
copy the recode value.
(The following flow will vary depending on which domain provider you got your domain from, but the basic flow should be the same)
Go to the domain provider’s site and go to the DNS record settings page.
set the type “TXT” and paste the previous record.
The hostname could be left blank.
and it is OK including “google-site-verification” like this:
Press the button to complete the setting.
Go back to the firebase hosting page and press “Verify”
**It may not be authenticated until a short time has passed since the DNS record was set above. About 10 minutes??)
Then, get an A record and copy it.
As before, go back to the DNS record registration and this time register it with A-type.
Press the button to complete the setting.
Go back to the firebase hosting page and press “Finish”
If you want to add a domain with www, you can easily add it using the Add button displayed on the hosting screen.
All you have to do is wait and you are done!
I was told that it takes up to 24 hours, but it took me about an hour to complete.
**Initially, it will say “Needs setup” and there is no problem.
Eventually, the Status will change to “Pending”.
the not secured page will be displayed when the status is “Pending” :
but you can access the page with no SSL by “Advanced”
When the Status becomes “Connected”, you are done!
You should now have secure access!
**The www one will change to Connected a little later.
**By the way, firebase deploy seems to update the old URLs together.
Now you’re free to set up a custom domain for Firebase hosting too!
Happy Developing!
I hope that this article will be of some help to you!