3

I am trying to use dynamic links for firebase using my custom domain link. For the above purpose, I added the custom domain on firebase web hosting, and followed all the steps, but status is still showing as "Needs setup".

My main domain pointing to some other host, the sub domains pointing to some aws elastic ips, and now the newly created sub domain to firebase ips. The dns provider that i am using is cloudflare.

www.maindomain.com => webflow host

subdomain1.maindomain.com => aws elastic ip 1

subdomain2.maindomain.com => aws elastic ip 2

firebasesubdomain.maindomain.com => firebase ip records (A Records).

I cannot delete all the A records just to point to firebase, since the aws elastic ip's are my live servers serving my customers. So my question is keeping all of the above records intact is there a way to point my subdomain to firebase and transfer only the subdomain's ownership to firebase, where then i can easily create dynamic links for that domain as well?

Omer Kahoot
  • 144
  • 1
  • 9
  • 1
    So long as you entered the subdomain when connecting the domain to Firebase Hosting, this should be fine. Does the "Needs Setup" tell you any more when you click into the dialog? What happens if you do `dig firebasesubdomain.maindomain.com`? – Michael Bleigh Jan 08 '20 at 17:47
  • On the dialog it only shows: **Add these A records to your domain by visiting your DNS provider or registrar.** whereas, I've already added those records to cloudflare. I'll run the command and will share the results as well in a few. – Omer Kahoot Jan 08 '20 at 18:02
  • Dig command gives me the following: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1300 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 **firebasesubdomain.maindomain.com. 300 IN A 104.24.118.52 ** **firebasesubdomain.maindomain.com. 300 IN A 104.24.119.52** Both ip's are part of the cloud flare network – Omer Kahoot Jan 08 '20 at 18:21
  • 1
    That's your problem -- you need to point directly to the Firebase Hosting IP addresses. Turn off the Cloudflare proxy layer and you should be good to go. – Michael Bleigh Jan 08 '20 at 18:33

1 Answers1

4

When connecting a domain to Firebase Hosting, you must ensure your A records are pointing directly to the Firebase IP addresses. You can check this using e.g.:

dig firebasesubdomain.maindomain.com

If the Cloudflare proxy is turned on, Cloudflare will set the A records to their own IP addresses and Firebase Hosting will not be able to recognize the IPs. You should turn off the Cloudflare proxy, as Firebase Hosting is already serving content over a CDN and proxying will only introduce additional latency.

Michael Bleigh
  • 25,334
  • 2
  • 79
  • 85