Firebase is Google’s platform for building and growing web and mobile apps quickly. By linking a custom domain, you can serve your content on your own branded URL.
Step 1: Add domain
-
Log in to your Firebase account and open the Connect Domain wizard.
-
If you have a hosting site, simply click Connect domain.
-
If you manage multiple hosting sites, click View for the site you want to connect, then select Connect domain.
-
- Enter the custom domain name that you'd like to connect your Firebase account to.
- (Optional)Enable the setting to redirect all traffic from the naked domain to the www version (so both yourdomain.com and www.yourdomain.com point to the same site).
- Click Continue to start the domain validation process.
Step 2: Verify Domain Ownership
Firebase may ask you to verify ownership of your apex domain to confirm that the domain isn’t already linked to another Firebase project.
-
Log in to your client area and access the DNS management page. Click here to learn how to manage your DNS records
-
Create a TXT record with the values provided by Firebase and save the changes.
-
Wait up to 24 hours for DNS propagation, then return to Firebase and click Verify.
Step 3: Go live
In the Firebase console, the Connect Domain page gives two setup options: Quick Setup (for new sites) or Advanced Setup (for migrating an existing site without downtime).
Quick Setup
- Log in to the client area
- Click on Domains -> DNS Manegement and create two A records:
- Type: A Record
- Host: Enter your custom domain (apex or subdomain). This may appear as "Host Name," "Name," or "Domain."
- Value: Enter the IP addresses provided by Firebase. This field may be labelled as "Data," "Points To," "Content," or "IP Address"
- Wait for your SSL certificate to be issued. This can take up to 24 hours, though propagation and SSL provisioning often happen faster depending on the domain registrar.
Advanced Setup (For Existing Sites)
- Firebase will provide a token for migrating your current site. You can use either method to provide it:
- Update DNS TXT records: Add a TXT record with the domain key and token value at your domain registrar. Allow up to 24 hours for propagation.
- Upload a token file: Place the token file at the URL specified by Firebase on your existing site, then verify its presence.
- After the token is validated, wait for your SSL certificate to be issued.
- Once the SSL certificate is ready, go back to the DNS management section in the client area and add two A records pointing your custom domain to Firebase Hosting:
- Type: A Record
- Host: Your custom domain (apex or subdomain)
- Value: IP addresses provided by Firebase
Once these steps are complete, your custom domain will be fully connected to your Firebase Hosting site, secure with SSL, and ready to serve your content.