Firebase is a mobile and web application development platform by Google that helps businesses deploy and grow quickly. Follow these steps to connect your custom domain to Firebase Hosting.
Step 1: Add Your Domain
- Log in to your Firebase account and open the wizard for connecting a custom domain.
- If you have only one Hosting site, click Connect domain.
- If you have multiple Hosting sites, click View for the desired site, then click Connect domain.
- Enter the custom domain name you want to connect.
- (Optional) Check the box to redirect all requests from your domain (e.g.,
yourdomain.com
andwww.yourdomain.com
) to the same content. - Click Continue to start the validation process.
Step 2: Verify Domain Ownership
If prompted, verify your apex domain to ensure it is not already linked to another Firebase project and that you own it.
- Go to your domain provider’s DNS management page.
- Add a new TXT record with the provided verification details.
- Save the changes and wait up to 24 hours for the DNS record to propagate.
- Click Verify in the Firebase console once propagation is complete.
Step 3: Go Live
After verification, choose one of the following setups:
Quick Setup (For New Sites)
- Open your domain provider’s DNS management page and create two DNS A records to point your domain to Firebase Hosting.
- Type: A records (Add two entries).
- Host: Your custom domain key (e.g.,
yourdomain.com
orsub.yourdomain.com
). - Value: Assign each A record to a specified Firebase IP address.
- Allow up to 24 hours for the changes to propagate and for your SSL certificate to be issued. This typically completes within a few hours.
Advanced Setup (For Existing Sites on Another Host)
- Provide a verification token to migrate your existing site. Choose one of the following methods:
- Update DNS TXT records: Add a TXT record with the provided domain key and value. (Allow up to 24 hours for propagation.)
- Upload a verification file: Place the provided token in a specified location on your existing website and verify its existence.
- Once verification is complete, allow up to 24 hours for your SSL certificate to be provisioned.
- Return to your DNS provider’s DNS management page and create two DNS A records to point your domain to Firebase Hosting.
- Type: A records (Add two entries).
- Host: Your custom domain key.
- Value: Assign each A record to the specified Firebase IP address.
Final Steps
- Once propagation is complete, your custom domain will be fully connected to Firebase Hosting.
- If you experience delays, check your DNS settings or contact your domain provider for assistance.
Your site is now live on Firebase Hosting!