Dynamically create subdomain for each client? - firebase

I know many ppl asked this question before. But they are answer years ago. Now it's 2020. Not sure if Firebase supports subdomain for each client now. Can anyone can give an update?
Link to the old question:
Firebase - Subdomain for each client

Wildcard domains (e.g. *.mydomain.com) are not yet supported by Firebase Hosting, and due to limitations of our Certificate Authority (Let's Encrypt), there are relatively low limits on the number of subdomains of a given domain that can have certificates minted in a given time period.
For now, the answer remains that this is not a use case that is supported well on Firebase Hosting, and we don't recommend using Firebase Hosting for massively multi-tenant custom domains at this time.

Related

Firebase hosting sub-domain limit

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
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.
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?
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
This limit is per project, so if you put different domains on different projects they are not affected by it.
The documentation seems to describe the process pretty well: https://cloud.google.com/storage/docs/hosting-static-website#lb-ssl
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.

Can I add a domain to Firebase hosting via the API?

I want to be able to add domains to Firebase hosting with the API instead of the web UI, is that possible?
I want to add potentially hundreds of domains, is there a domain limit per project in Firebase?
As far as I can tell from the entire CLI documentation, there isn't any way to do this.
Lets take a step back and consider what the web UI process involves i.e. the generation of a TXT record to add to your DNS records, after verifying the presence of said TXT record on the domain, providing A records that you (authorized owner) add to allow redirecting to your firebase hosted site.
In my opinion, this very manual back and forth is necessary as a security measure. The only way it is taken out of the equation via the CLI is by providing a means for you to authenticate ownership of a domain (registered with any one of many domain registrars), and being granted authorization to change your A records. These are both outside the scope of Firebase, and could potentially introduce severe security flaws. Regardless, even if it existed, it would still have to be step-by-step and somewhat manual via CLI rather than the single command it sounds like you're looking for.
It is not possible to add custom domains automatically through an API at this time.
Nor would it allow you to create a reseller or multi-tenant project (i.e. connect a large number of domains or subdomains dynamically) since you cannot connect more than about 36 domains connected to one project.
It's possible to add domains using Firebase Hosting Rest Api. I am not sure why they didn't put it on their official website but I checked today and it works. https://developers.google.com/resources/api-libraries/documentation/firebasehosting/v1beta1/java/latest/com/google/api/services/firebasehosting/v1beta1/FirebaseHosting.Sites.Domains.html
Answer that I've received from Firebase support:
There is no API yet that would allow you to add custom domains, it was
requested as a feature before but unfortunately we have no more
information on that - so for now, only the Console UI allows you to do
it.
When it comes to the limits, in a project, a custom domain is
attached to a site - there can be 36 sites per project, and for one
site there is no hard limit, but we recommend not exceeding 20 custom
domains. You can experience technical issues with SSL certs when you
exceed 20 domains per site, which we won’t be able to troubleshoot
since the system was not designed for such use cases.

Is there a request limit for firebase hosting?

I have been trying to find how many requests can be made to a static website hosted via firebase but I can't seem to find an answer.
There are no limits to the number of requests. In terms of cost, everything you need to know is on the pricing page. Pricing has nothing to do with the volume of requests.

Can Firebase support reverse DNS records?

I'm setting up a website hosted on Firebase. Currently, I'm using the Mautic for email automation which is currently going to Spam. My technical resource told me it was because I needed to set up rDNS records.
Does anyone know if Firebase supports this? I couldn't find any answers on here or Google.
Firebase Hosting doesn't do any DNS hosting at all. You'll need to use some other DNS provider, which can often be the registrar of your domain.

How to mask firebase db dns with a custom domain [duplicate]

This question already has an answer here:
Firebase custom domain name for database
(1 answer)
Closed 4 years ago.
Let say i have a firebase db at https://vivid-fire-id.firebaseio.com/.
So the browser will try to connect to vivid-fire-id.firebaseio.com particular domain.
Is there way to add a custom domain from which the db is accessed from?
For eg: https://firebase.mydomain.com
This is required to make sure that firewalls do not create problem while access our application.
api gateway can be one of possible solution. Google search reveals lot of info on api gateways
Treat firebase as a microservice.

Resources