Reputation: 1493
I am trying to set custom domain for my Firebase app.
Firebase hosted url : https://inventory-app-726af.firebaseapp.com/
Custom Domain: inv.agsft.com
I have followed all instructions as part of setting custom domain but after verification step when I click on finish button, status will always be "Needs Setup".
I am managing DNS through cloudflare (https://www.cloudflare.com/) and I am following Quick setup option.
Any pointers to resolve it?
Upvotes: 66
Views: 31196
Reputation: 788
I had the same problem, I was able to resolve it by toggling the DNS Status on cloudflare from DNS and HTTP Proxy (CDN)
to just DNS
on the two A records
It started working right away.
Upvotes: 61
Reputation: 9220
Working as of 11st May 2022 without need to toggle DNS and HTTP Proxy (CDN).
Steps:
Upvotes: -1
Reputation: 169
For GoDaddy this adding the following solved it for me:
TYPE:A
NAME:@
VALUE: your ip_1
TYPE:A
NAME:@
VALUE: your ip_2
Upvotes: 3
Reputation: 3745
Toggling DNS mode didn't work for me. So I tried following approach and it worked for me.
CNAME
record pointing to {firebase-project}.firebaseapp.com
or {firebase-project}.web.app
, you could add A
record and try.TXT
record as firebase ask younewdomain.com/*
or subdomain.newdomain.com/*
then add settings select SSL and set it to full as follows.Then it will work as expected.
Upvotes: 0
Reputation: 934
June 2020
Just wanted to share what was successful for me. It was a combination Brennen and Lisbel's answer.
Step 1: Toggle off your DNS status to get a grey cloud (as shown in the earlier answer)
Step 2: Delete the domain from firebase
Step 3: Add it back with Quick Steup
It should be connected after these steps!
Upvotes: 2
Reputation: 41
In my case I did the same that Brennen did:
But just start working when I:
After that automatically the status added was connected.
Remember: Before testing, clean your browser cache.
Upvotes: 4
Reputation: 689
For the people that is using Namecheap, This configuration worked for me.
Upvotes: 20
Reputation: 861
To avoid any kind of ssl issues when using firebase hosting and cloudflare you have to check to following points:
If you "keep the cloud orange" it will not causes any problem to your firebase hosting.
Add the firebase IP's to cloudflare following the instructions provided by firebase hosting and remove any other A record from your domain/subdomain that you are setting up
To ensure you have a end-to-end encryption (using both firebase ssl as well as cloudflare ssl), make sure that your cloudflare crypto options is set to "Full":
p.s: Look that the message "Needs setup" is still there but the app is running without any problem.
p.s2: the majority problems regarding cloudflare and firebase is that firebase ssl can take several hours to start to work and you keep seeing a message like "your connection is not private". It happens not beucase cloudflare is messing our proxy out but because firebase ssl is still not fully propagated.
I hope it help others :)
Upvotes: 9
Reputation: 2084
I had the same issue. Here's how I fixed it:
1) Cick the View button on the problematic domain (in the Hosting section next to where it says Needs Setup).
2) Change the 'Setup mode' from Quick Setup to Advanced and follow the 3 steps
This is not a quick process, but it should be working about 5 minutes after you complete step 2c.
Upvotes: 0
Reputation: 23052
When I change my setting like below, it started to work again. Redirect loop fixed:
Upvotes: 3
Reputation: 5053
The proper solution, ie without disabling Cloudflare for the site, is to use Full SSL for your domain/subdomain.
You can either choose Full SSL for all your domain entries, or set up a Page Rule for a specific subdomain, in your case, use "inv.agsft.com/*"
Source: https://community.cloudflare.com/t/flexible-ssl-redirect-loop-with-google-firebase/2063/3, which in turn points to https://support.cloudflare.com/hc/en-us/articles/115000219871-Why-does-Flexible-SSL-cause-a-redirect-loop-
Had the same issue and this solved the redirect issue. Firebase will however still report the domain as "Needs setup", for that I have no solution, but it does not affect the functionality of the hosting.
Upvotes: 28
Reputation: 598765
When I run dig -t txt +noall +answer inv.agsft.com
there are no TXT records showing. Since those are required to verify your ownership of the domain, Firebase Hosting will not continue the setup beyond step one.
Update: since the next step requires you to map A
records to the IP addresses of Firebase hosting, I ran the relevant dig
too:
$ dig -t a +noall +answer inv.agsft.com
inv.agsft.com. 299 IN A 104.18.56.240
inv.agsft.com. 299 IN A 104.18.57.240
Those are not the addresses I'd expect for Firebase Hosting, so it looks like either you haven't correctly entered the A
records, or they have't propagated yet.
Upvotes: 4