1

I am looking to host multiple sites using firebase but have read something that could cause problems.

Each custom domain is limited to having 20 subdomains per apex domain, due to SSL certificate minting limits.

https://cloud.google.com/storage/docs/hosting-static-website

I was hoping to use subdomains, e.g. a.example.com, b.example.com ...etc.

This limit of 20 domains seems quite restrictive and I have some questions

  1. If I create separate projects for each subdomain does this limit still apply? e.g. have 1 firebase project with a hosting site for a.example.com and have a entirely separate firebase project for hosting b.example.com.

  2. I have also read you can hosting using cloud storage and a load balancer. https://cloud.google.com/storage/docs/hosting-static-website. Does this provide an automatic certificate or is it manual?

  3. Does the limit of 20 subdomains apply only to firebase hosting or does it also apply to hosting via cloud storage and a load balancer?

Thanks

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
h11
  • 108
  • 1
  • 13
  • 1
    20 domains might appear restrictive but there are performance issues with huge certificates. Each connection must validate the certificate. For sites that need a large number of subdomains, use wildcard certificates. This also means using a service such as Compute Engine where you can deploy your own wildcard certificate. – John Hanley Sep 14 '21 at 20:51

1 Answers1

1
  1. This limit is per project, so if you put different domains on different projects they are not affected by it.

  2. The documentation seems to describe the process pretty well: https://cloud.google.com/storage/docs/hosting-static-website#lb-ssl

  3. This limit applies to Firebase Hosting only. Other products may have their own limits of course, but those would be listed in the documentation for that product.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • In your first item, by "different domains" you mean the sub-domains *.example.com ? I would like to know if it's actually possible to have for example, 20 sub-domains on one project and 20 other sub-domains on another firebase project, and all 40 sub-domains have the same apex domain ? – Omarkad Nov 26 '21 at 13:30