Bird
Raised Fist0
Firebasecloud~10 mins

Custom domain configuration in Firebase - Step-by-Step Execution

Choose your learning style10 modes available
Process Flow - Custom domain configuration
Start: Firebase Hosting Setup
↓
Add Custom Domain in Firebase Console
↓
Firebase Provides DNS Records
↓
Update Domain DNS Settings
↓
Firebase Verifies Domain Ownership
↓
SSL Certificate Provisioned
↓
Custom Domain Active and Serving Content
This flow shows how to connect your own website address to Firebase Hosting by adding the domain, updating DNS, verifying ownership, and enabling secure access.
Execution Sample
Firebase
firebase hosting:sites:create my-site
firebase hosting:channel:deploy live
# Add custom domain via Firebase console
# Update DNS records as instructed
# Wait for verification and SSL provisioning
Commands and steps to create a hosting site, deploy content, add a custom domain, update DNS, and activate the domain.
Process Table
StepActionFirebase ResponseUser ActionResult
1Create Hosting SiteSite 'my-site' createdRun create commandHosting site ready
2Deploy ContentChannel 'live' deployedDeploy app filesContent available on default URL
3Add Custom DomainDomain 'example.com' addedAdd domain in consoleDomain pending verification
4Provide DNS RecordsDNS records shownCopy DNS recordsRecords ready to update
5Update DNS SettingsWaiting for DNS propagationUpdate domain registrar DNSDNS changes propagating
6Verify Domain OwnershipDomain verifiedWait for Firebase verificationOwnership confirmed
7Provision SSL CertificateSSL certificate issuedAutomaticSecure HTTPS enabled
8Activate Custom DomainDomain activeAutomaticSite serves on custom domain
9ExitProcess complete-Custom domain fully configured
💡 Custom domain is active and serving content securely after verification and SSL provisioning.
Status Tracker
VariableStartAfter Step 3After Step 6After Step 7Final
Hosting SiteNoneCreated 'my-site'Created 'my-site'Created 'my-site'Created 'my-site'
Custom Domain StatusNoneAdded, pending verificationVerifiedVerifiedActive
DNS RecordsNoneProvidedUpdated at registrarUpdated at registrarUpdated at registrar
SSL CertificateNoneNoneNoneIssuedIssued
Key Moments - 3 Insights
Why does the custom domain show as 'pending verification' after adding it?
Because Firebase waits for you to update your domain's DNS records and then verifies ownership (see execution_table step 3 and 6). Until verification completes, the domain is not active.
What happens if DNS records are not updated correctly?
Firebase cannot verify domain ownership, so SSL won't be issued and the domain won't become active (see execution_table step 5 and 6). Correct DNS updates are essential.
Is SSL certificate setup manual or automatic?
Firebase automatically provisions the SSL certificate after domain verification (see execution_table step 7). You do not need to manage SSL yourself.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, at which step does Firebase verify domain ownership?
AStep 6
BStep 7
CStep 4
DStep 5
💡 Hint
Check the 'Firebase Response' column for 'Domain verified' in the execution_table.
According to the variable tracker, what is the status of the SSL certificate after step 6?
AIssued
BNone
CPending
DExpired
💡 Hint
Look at the 'SSL Certificate' row under 'After Step 6' in the variable_tracker.
If DNS records are not updated at the registrar, what will happen to the custom domain status?
AIt will become active immediately
BIt will be removed automatically
CIt will remain pending verification
DSSL will be issued anyway
💡 Hint
Refer to key_moments about DNS updates and execution_table steps 5 and 6.
Concept Snapshot
Custom domain setup in Firebase Hosting:
1. Create hosting site and deploy content.
2. Add your domain in Firebase console.
3. Update DNS records at your domain registrar.
4. Firebase verifies ownership and issues SSL.
5. Domain becomes active and serves content securely.
Full Transcript
This visual execution shows how to configure a custom domain in Firebase Hosting. First, you create a hosting site and deploy your app. Then, you add your custom domain in the Firebase console. Firebase provides DNS records that you must add to your domain registrar. After DNS propagation, Firebase verifies domain ownership. Once verified, Firebase automatically provisions an SSL certificate. Finally, your custom domain becomes active and serves your content securely over HTTPS. The execution table traces each step with Firebase responses and user actions. The variable tracker shows how domain status, DNS records, and SSL certificate state change through the process. Key moments clarify common confusions about verification and DNS updates. The quiz tests understanding of verification steps, SSL status, and DNS impact. This step-by-step trace helps beginners see exactly how Firebase connects their domain to hosting.

Practice

(1/5)
1. What is the main purpose of configuring a custom domain in Firebase Hosting?
easy
A. To enable Firebase Authentication for your app
B. To increase the storage capacity of your Firebase project
C. To create a new Firebase project automatically
D. To use your own website address instead of the default Firebase URL

Solution

  1. Step 1: Understand Firebase Hosting default URLs

    Firebase Hosting provides a default URL, but it is not personalized.
  2. Step 2: Purpose of custom domain

    Configuring a custom domain lets you use your own website address, making it easier for users to find your site.
  3. Final Answer:

    To use your own website address instead of the default Firebase URL -> Option D
  4. Quick Check:

    Custom domain = personal website address [OK]
Hint: Custom domain means your own website address, not Firebase default [OK]
Common Mistakes:
  • Confusing custom domain with Firebase project storage
  • Thinking it enables authentication automatically
  • Assuming it creates a new Firebase project
2. Which DNS record type is commonly required to verify domain ownership when setting up a custom domain in Firebase Hosting?
easy
A. CNAME record
B. MX record
C. TXT record
D. A record

Solution

  1. Step 1: Identify verification method

    Firebase asks you to add a DNS record to prove you own the domain.
  2. Step 2: Common DNS record for verification

    TXT records are used to store text data for verification purposes.
  3. Final Answer:

    TXT record -> Option C
  4. Quick Check:

    Domain verification uses TXT record [OK]
Hint: Verification usually needs a TXT DNS record [OK]
Common Mistakes:
  • Using MX record which is for email routing
  • Confusing CNAME with verification record
  • Using A record which points IP address
3. You added a CNAME record pointing www.example.com to ghs.googlehosted.com as Firebase instructed. What will happen when users visit www.example.com after DNS propagation?
medium
A. Users will get a DNS error and cannot reach the site
B. Users will see your Firebase hosted website at www.example.com
C. Users will be redirected to Firebase console login page
D. Users will see a default Firebase project page

Solution

  1. Step 1: Understand CNAME record purpose

    CNAME points your domain to Firebase Hosting's server address.
  2. Step 2: Effect after DNS propagation

    Once DNS updates, visiting www.example.com loads your Firebase hosted site.
  3. Final Answer:

    Users will see your Firebase hosted website at www.example.com -> Option B
  4. Quick Check:

    CNAME to Firebase = site loads correctly [OK]
Hint: CNAME to Firebase host means your site shows on your domain [OK]
Common Mistakes:
  • Expecting DNS error after correct CNAME setup
  • Thinking users get Firebase console page
  • Assuming default Firebase page shows instead
4. You configured your custom domain but users report your site is not loading. Which of these is the most likely cause?
medium
A. You forgot to verify domain ownership by adding the required DNS record
B. You used an A record instead of a TXT record for verification
C. You deployed your Firebase project without enabling billing
D. You did not enable Firebase Authentication

Solution

  1. Step 1: Check domain verification requirement

    Firebase requires domain ownership verification before serving your site.
  2. Step 2: Effect of missing verification

    If verification is missing, Firebase will not serve your site on the custom domain.
  3. Final Answer:

    You forgot to verify domain ownership by adding the required DNS record -> Option A
  4. Quick Check:

    Missing verification = site won't load [OK]
Hint: Always verify domain ownership to activate custom domain [OK]
Common Mistakes:
  • Confusing billing with domain verification
  • Thinking authentication affects domain setup
  • Using wrong DNS record type for verification
5. You want to configure both example.com and www.example.com to serve your Firebase hosted site securely. Which is the best approach?
hard
A. Add both domains in Firebase Hosting, verify ownership for both, and set DNS records accordingly
B. Only add www.example.com in Firebase and redirect example.com to it without verification
C. Add example.com only and rely on Firebase to automatically serve www.example.com
D. Use only example.com and set a CNAME record for www.example.com pointing to example.com

Solution

  1. Step 1: Add both domains in Firebase Hosting

    Firebase requires each domain to be added and verified separately.
  2. Step 2: Verify ownership and set DNS for both

    You must verify both domains and configure DNS records to point to Firebase Hosting.
  3. Step 3: Ensure HTTPS works on both domains

    Firebase provisions SSL certificates for each verified domain to serve securely.
  4. Final Answer:

    Add both domains in Firebase Hosting, verify ownership for both, and set DNS records accordingly -> Option A
  5. Quick Check:

    Both domains added and verified = secure site on both [OK]
Hint: Add and verify each domain separately for full coverage [OK]
Common Mistakes:
  • Assuming Firebase auto-serves unadded domains
  • Skipping verification for one domain
  • Using CNAME incorrectly for apex domain
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard