Firebase hosting does not deploy on custom domain

Luca Natale

i've deployed my app on firebase hosting and then i have bought a custom domain from Google Domains.

Then i have proceeded in this way:

  1. Go to firebase hosting control panel
  2. Click on Add Custom Domain
  3. Then add my domain in like this my-domain.com

So, at this point firebase give me an A Type Record to add to my dns configuration in google domains that look like this: google domains setup

I leave empty the host name input, then i add google firebase ip infos in "value" input and save both on firebase and google domains.

But nothing happen.

Firebase told me that i require a configuration and domains says that is all okay.

firebase and domains response

Neea

It will take some time, usually in the magnitude of minutes (rather than hours, and certainly not days) to start working, but looking at the "google domains setup" screenshot, I believe there is an issue with the DNS setup as the screenshot shows an incomplete configuration.

For anyone else looking to resolve this, I will write the complete steps to help resolve the issue, for Firebase and Google Domains: retrace these steps, since any one of them could be the source of the issue.

First on Firebase Hosting:

  1. Click add custom domain
  2. Enter the custom domain or subdomain in the provided input box (note the difference!)
  3. Lastly firebase will show a screen with details of how to configure the DNS. The "quick setup" is sufficient for new sites. It will look like this:

Firebase shows DNS configuration info


The next step is to enter this information into the domain name provider's console, in this case Google domains.

On Google Domains console:

  1. Go to DNS configuration, then "custom records" section
  2. Since this is a newly registered domain, there should not be existing records, but otherwise see the blue star note above: "Remember to remove..."
  3. "create new record"
  4. To get this last part correctly requires paying attention to the difference in how to configure domain/subdomain, so I will present them separately to highlight the difference:

Option A) subdomain configuration e.g. www.mywebsite.com

The entry in the DNS configuration should look as follows, where the data is the IPv4 address from Firebase. Note for "host name", enter the subdomain-part only:

Host name Type TLL Data
www A 3600 255.255.255.255

Option B) domain name configuration e.g. mywebsite.com

The host name entry is intentionally left blank, and data is the IPv4 obtained from Firebase.

Host name Type TLL Data
A 3600 255.255.255.255

Save the DNS changes then wait. If you return to Firebase hosting, it may say "needs setup" ... then "pending" ... while these changes are being propagated and waiting for a SSL cert to be provisioned. The state should say "pending" very soon after applying the DNS changes (< 5 min).

Check the (sub)domain periodically in the browser, to see when it starts working (it took me about 20 minutes to give you some anecdotal metric, and it started working before the "pending" label had been resolved in Firebase). Eventually Firebase will switch the state label to "connected" to complete the configuration.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Angular 6.0 firebase hosting deploy not working

Redirect to Firebase Hosting custom domain

Firebase Hosting Custom Domain - site not "Go Live" after update DNS records by "CNAME records" method

Firebase hosting does not send custom HTTP headers

using "firebase deploy" to deploy to hosting - how does firebase know if it is deploying to hosting and not cloud functions?

Firebase Hosting deploy only to sub directory

SSL certificate generated by Firebase Hosting does not include connected domain

Firebase deploy only deploys functions but not hosting?

Using Firebase Hosting to deploy the angular application

Firebase Hosting deploy gives HTTP Error 401

Firebase hosting: Domain is connected but it is not working

Mapping GoDaddy domain to Firebase Hosting does not get verified

firebase deploy hosting from remote (google storage)

Firebase hosting deploy with serviceaccount fails with 403

Firebase dynamic links and hosting on the same (custom) domain

Error: hosting:channel:deploy is not a Firebase command

Deploy Google Endpoint in a custom Domain

Firebase hosting custom domain error

Firebase Domain Hosting is slow

Firebase hosting not connecting to custom domain

Firebase hosting with a custom domain name still uses 'xxx.firebaseapp.com'

Firebase hosting - user custom domain (white-labeling)

Firebase hosting custom domain 404 when forwarding requests to Cloud Functions

SSL with Firebase hosting - OVH domain

Firebase Hosting custom domain suddenly stopped working while trying to add www redirect

Deploy website on Firebase Hosting with specific path

Disable Firebase hosting github deploy

Deploy Nuxt 3 website to Firebase Hosting

How to setup custom domain for firebase hosting using firebase cli on CloudBuild