Adding more than 20 custom domains to point to a Firebase hosting endpoint

424 views
Skip to first unread message

DavidP

unread,
Jul 19, 2019, 9:58:45 AM7/19/19
to Firebase Google Group

Hello all,

we currently have a solution that allows our customers to add CNAMES to access their content through their own domains. (About a 1000 in total).

We're moving the entire stack to Google Cloud, with the main product residing on a Firebase Hosting deployment, with serverless functions, storage and Firestore databases. We also use various other GCP products in the pipeline.

I am aware that we can manually and programatically add CNAMES to our Firebase hosting account, but there is a hard limit of 20, due to SSL minting.


My question: does GCP offer a solution where we can programatically add CNAMES, generate a self signed certificate, and point them via a proxy to our Firebase hosting URL, while retaining the originating CNAME, but serving our Firebase content?

Or recommended approach for this solution?


Things we don't want to do:

 - Have multiple Firebase deployments with 20 domains each

 - Add any hosted solutions (compute engine etc) as an intermediary
 - Move away from Firebase

Things we do not mind doing:
 - Knit together various GCP solutions to help us achieve this
 - Listen to kind advice from you all

Michael Bleigh

unread,
Jul 19, 2019, 2:09:00 PM7/19/19
to Firebase Google Group
Hi David,

Unfortunately Firebase Hosting is probably not the best solution for you today in this regard. Due to limitations of Let's Encrypt (the certificate authority used by Firebase Hosting) we can't support arbitrarily large numbers of subdomains, and supporting custom domains for "customers of customers" is really difficult.

I don't want to discourage you from using GCP, but you likely would need to put some kind of intermediary hosting/routing solution to be able to achieve this at the moment.

Sorry I can't be of more help!

-Michael

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8ac555b3-d264-45a6-833f-fc01eb562dd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DavidP

unread,
Jul 20, 2019, 10:41:21 AM7/20/19
to Firebase Google Group
Hi Michael, 

many thanks! We've posted the same question to the Firebase support/feature request address and Kyle confirmed that Firebase Hosting is not the best tool for what we intend. However, my original question was more to ask which GCP tool/service we can employ to be able to keep our current Firebase toolset and workflow.

Since I posted I experimented a little with GCP tools and came up with this workflow:

 - Deploy our site code to a Cloud Run container
 - Change our Firebase rewrite config to point to the cloud container, and not the serverless function it currently points to
 - Programatically map new domains and CNAMES using the Cloud Run API for domain mappings.

We cannot find any hard limits on domain mappings within the Cloud Run documentation, as you are able to point multiple domains to a single service. I have successfully managed to add 25 cnames, and have Cloud Run provision SSL certs for them. But it's risky to invest in this approach and hit a hard limit that's not documented. Do you have visibility on this at all? Any areas of concern with an approach like this?

Thank you so much for the open community and your willingness to answer our questions. Confirms our investment in GCP is worth while!

David



On Friday, 19 July 2019 20:09:00 UTC+2, Michael Bleigh wrote:
Hi David,

Unfortunately Firebase Hosting is probably not the best solution for you today in this regard. Due to limitations of Let's Encrypt (the certificate authority used by Firebase Hosting) we can't support arbitrarily large numbers of subdomains, and supporting custom domains for "customers of customers" is really difficult.

I don't want to discourage you from using GCP, but you likely would need to put some kind of intermediary hosting/routing solution to be able to achieve this at the moment.

Sorry I can't be of more help!

-Michael

On Fri, Jul 19, 2019 at 6:58 AM DavidP <d...@paperturn.com> wrote:

Hello all,

we currently have a solution that allows our customers to add CNAMES to access their content through their own domains. (About a 1000 in total).

We're moving the entire stack to Google Cloud, with the main product residing on a Firebase Hosting deployment, with serverless functions, storage and Firestore databases. We also use various other GCP products in the pipeline.

I am aware that we can manually and programatically add CNAMES to our Firebase hosting account, but there is a hard limit of 20, due to SSL minting.


My question: does GCP offer a solution where we can programatically add CNAMES, generate a self signed certificate, and point them via a proxy to our Firebase hosting URL, while retaining the originating CNAME, but serving our Firebase content?

Or recommended approach for this solution?


Things we don't want to do:

 - Have multiple Firebase deployments with 20 domains each

 - Add any hosted solutions (compute engine etc) as an intermediary
 - Move away from Firebase

Things we do not mind doing:
 - Knit together various GCP solutions to help us achieve this
 - Listen to kind advice from you all

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages