You don't have to give up your unique, brand-centric domain names for apps
deployed on Firebase App Hosting. You can use a custom domain (like
example.com
or app.example.com
) instead of a Firebase-generated domain for
your Firebase-hosted site. Firebase App Hosting provisions an SSL
certificate for each of your domains.
The rest of this document walks you through the steps to connect your custom domain.
Set up your domain for App Hosting
Make sure that you've completed the basic App Hosting setup tasks so that you have a Firebase App Hosting site in your Firebase project.
Step 1: Add custom domain
- Open your project's App Hosting page.
- Select an App Hosting backend using the View Dashboard option.
- Select the Settings tab, then click Add custom domain.
- Enter the custom domain name that you'd like to connect to your App Hosting site.
- (Optional) Check the box to redirect all requests on the custom domain to
a second specified domain (such that
example.com
andwww.example.com
redirect to the same content). - Click Continue to configure your DNS records and finish setting up your custom domain.
Step 2: Set up custom domain
The Add Custom Domain wizard of the Firebase console will show the necessary records that need to be updated to point your page to Firebase App Hosting. Add, remove, and save records from your domain in your DNS provider with the following inputs:
- Type: Add the provided DNS record.
Host: Enter your custom domain key for the records. The host you indicate is the domain on which you want to serve content; this domain can be an apex domain or subdomain. Your domain provider may list this term as "Host Name", "Name", or "Domain".
Value: Assign the provided value to your records. Your domain provider may list this term as "Data", "Points To", "Content", "Address", or "IP Address". The content of the value field varies by record type, with A and AAAA records having IP addresses as values while TXT records are strings.
Allow time for your SSL certificate to be provisioned. This may take up to a few hours after you point your DNS to Firebase App Hosting. In most cases, propagation of your records and provisioning of your SSL certificate will happen within an hour, depending on your domain provider.
Wait for SSL certificate provisioning
App Hosting can take up to a few hours to provision an SSL certificate for your domain after you update your DNS records.
You can view this certificate using the browser's security tools. While the domain is provisioning, you might see an invalid certificate or have issues connecting to your domain. This is a normal part of the process and will resolve after your domain's certificate is available.
Note: Firebase App Hosting automatically reprovisions SSL certs, as needed, for custom domains.
Your custom domain key
When adding or editing DNS records, different domain providers expect you to enter different inputs for the Host field within their DNS management sites. We've compiled common inputs from popular providers below. Refer to your domain provider's documentation for detailed instructions.
Domain type | Custom domain key |
---|---|
Apex domain |
Common inputs include:
|
Subdomain | Common inputs include:
|
Common domain providers
Here are some common domain providers and the types of input each might require. This information is kept up-to-date as much as possible, but refer to your domain provider's documentation for detailed instructions.
Status descriptions for custom domains
Status | Description |
---|---|
Needs setup |
You may need to change a configuration with your DNS records.
|
Pending | You correctly set up your custom domain, but Firebase App Hosting hasn't provisioned an SSL certificate. Occasionally, excessively restrictive CAA records can stall the minting of an SSL certificate for a custom domain. Ensure that the certificate authorities `letsencrypt.org` and `pki.goog` are allowed to create SSL certs for your domain. |
Minting Certificate | An SSL certificate is being produced for your domain. |
Connected | Your custom domain has the proper DNS records and has an SSL
certificate. |