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

  1. 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.
  2. Enter the custom domain name you want to connect.
  3. (Optional) Check the box to redirect all requests from your domain (e.g., yourdomain.com and www.yourdomain.com) to the same content.
  4. 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.

  1. Go to your domain provider’s DNS management page.
  2. Add a new TXT record with the provided verification details.
  3. Save the changes and wait up to 24 hours for the DNS record to propagate.
  4. 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)

  1. 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 or sub.yourdomain.com).
    • Value: Assign each A record to a specified Firebase IP address.
  2. 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)

  1. 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.
  2. Once verification is complete, allow up to 24 hours for your SSL certificate to be provisioned.
  3. 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!

Byla tato odpověď nápomocná? 19 Uživatelům pomohlo (0 Hlasů)