Using the same custom domain (different subdomains) in 2 separate Firebase projects. Is this possible?

159 views Asked by At

I'd like to have 2 firebase projects for two separate environments. dev and prod.

  • my-project-prod
  • my-project-dev

If I have a single custom domain: www.mydomain.com

Can I use that same custom domain in those 2 different projects?

I would use different subdomains. Example:

  • my-project-prod would be connected to www.mydomain.com
  • my-project-dev would be connected to dev.mydomain.com

Is this possible?

1

There are 1 answers

0
wbhill13 On BEST ANSWER

Yes. When you click add custom domain in firebase hosting, for one, type in www.mydomain.com and add the resource records. For the other domain, type in dev.mydomain.com and add the resource records. When you add the 2 A records, make the host dev, instead of @ or www.