0
0
Firebasecloud~20 mins

Custom domain configuration in Firebase - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Firebase Custom Domain Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens after adding a custom domain in Firebase Hosting?

You add a custom domain to your Firebase Hosting project and verify ownership. What is the expected behavior immediately after this setup?

AThe custom domain will serve content only over HTTP until you enable HTTPS in the Firebase console.
BYou must manually upload an SSL certificate before the site is served on HTTPS.
CFirebase automatically provisions an SSL certificate and starts serving your site on HTTPS for the custom domain.
DFirebase Hosting will serve the site on the custom domain only after you deploy your site again.
Attempts:
2 left
💡 Hint

Think about Firebase Hosting's automatic security features.

Configuration
intermediate
2:00remaining
Which DNS record is required to verify a custom domain in Firebase?

To verify ownership of a custom domain in Firebase Hosting, which DNS record must you add to your domain's DNS settings?

AA CNAME record pointing to firebaseapp.com.
BA TXT record with a Firebase verification token.
CAn MX record with Firebase's mail server address.
DAn SRV record specifying Firebase Hosting service.
Attempts:
2 left
💡 Hint

Verification usually involves proving domain ownership via a special text entry.

Architecture
advanced
2:30remaining
How does Firebase Hosting handle traffic routing for multiple custom domains?

You have configured multiple custom domains for a single Firebase Hosting site. How does Firebase route incoming requests?

AFirebase routes requests based on the Host header to the same content for all configured domains.
BFirebase requires separate hosting sites for each custom domain to route traffic correctly.
CRequests are routed randomly among the configured domains unless you set up redirects.
DFirebase uses IP-based routing to distinguish traffic for each custom domain.
Attempts:
2 left
💡 Hint

Consider how web servers use the Host header to serve content.

security
advanced
2:00remaining
What security feature does Firebase Hosting provide automatically for custom domains?

After adding a custom domain to Firebase Hosting, which security feature is automatically enabled to protect your site?

AAutomatic HTTPS with free SSL certificates from Let's Encrypt.
BMandatory two-factor authentication for all visitors.
CIP whitelisting to restrict access to your site.
DAutomatic firewall rules blocking all non-Google IPs.
Attempts:
2 left
💡 Hint

Think about how Firebase secures traffic between browsers and servers.

Best Practice
expert
3:00remaining
What is the recommended approach to handle subdomain redirects in Firebase Hosting?

You want to redirect all traffic from blog.example.com to www.example.com/blog. What is the best way to configure this in Firebase Hosting?

Firebase
firebase.json
AConfigure a Firebase Cloud Function to handle requests to <code>blog.example.com</code> and respond with a redirect.
BSet up a DNS CNAME record from <code>blog.example.com</code> to <code>www.example.com/blog</code>.
CUse Firebase Hosting rewrite rules to redirect <code>blog.example.com</code> to <code>/blog</code> on <code>www.example.com</code>.
DCreate a Firebase Hosting redirect rule in <code>firebase.json</code> that redirects <code>blog.example.com</code> to <code>https://www.example.com/blog</code>.
Attempts:
2 left
💡 Hint

Consider how Firebase Hosting handles domain-based redirects in its configuration file.