Bird
Raised Fist0
GCPcloud~20 mins

Custom domains in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Custom Domain Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding DNS Records for Custom Domains

You want to connect your custom domain to a Google Cloud service. Which DNS record type is typically required to point your domain to a Google-managed service IP address?

AMX record
BA record
CTXT record
DCNAME record
Attempts:
2 left
💡 Hint

Think about the record that maps a domain to an IP address.

❓ Configuration
intermediate
2:00remaining
Configuring a Custom Domain for App Engine

You want to configure a custom domain for your Google App Engine app. Which step is not required?

AVerify domain ownership in Google Search Console
BCreate a DNS TXT record to prove ownership
CAdd a DNS record pointing your domain to the App Engine service
DSet up a firewall rule to allow traffic from your domain
Attempts:
2 left
💡 Hint

Think about what is needed to connect a domain to a service versus network security settings.

❓ Architecture
advanced
2:00remaining
Designing a Secure Custom Domain Setup

You want to serve your website on a custom domain using Google Cloud Load Balancer with HTTPS. Which architecture ensures the best security and performance?

AUse a Google-managed SSL certificate on the load balancer and point your domain's A record to the load balancer IP
BUse a self-signed SSL certificate on backend instances and point your domain's CNAME to the backend IP
CUse HTTP only on the load balancer and redirect HTTPS traffic at the backend
DUse a third-party SSL certificate on backend instances and point your domain's MX record to the load balancer
Attempts:
2 left
💡 Hint

Consider where SSL termination should happen for best security and performance.

❓ service_behavior
advanced
2:00remaining
Behavior of Custom Domain Mapping in Cloud Run

After mapping a custom domain to a Cloud Run service, what happens if you delete the DNS record pointing to the Cloud Run domain?

ATraffic is redirected to the default Cloud Run URL without interruption
BCloud Run automatically updates DNS to restore the record
CThe custom domain stops resolving to your Cloud Run service, causing downtime
DThe service continues to respond on the custom domain without DNS
Attempts:
2 left
💡 Hint

Think about how DNS controls domain name resolution.

❓ security
expert
2:00remaining
Preventing Domain Hijacking in Custom Domain Setup

Which practice best prevents unauthorized users from hijacking your custom domain when using Google Cloud services?

AEnable domain ownership verification and restrict DNS record changes to trusted users
BUse wildcard DNS records to cover all subdomains automatically
CDisable HTTPS to avoid certificate mismatches
DShare your Google Cloud credentials with your DNS provider
Attempts:
2 left
💡 Hint

Think about controlling who can prove ownership and change DNS settings.

Practice

(1/5)
1. What is the primary purpose of setting up a custom domain in Google Cloud Platform (GCP)?
easy
A. To use your own website address instead of a default GCP URL
B. To increase the storage capacity of your GCP project
C. To enable automatic backups for your cloud resources
D. To create virtual machines with custom names

Solution

  1. Step 1: Understand what a custom domain is

    A custom domain lets you use your own website address instead of a generic cloud URL.
  2. Step 2: Identify the purpose in GCP context

    In GCP, custom domains help users access services with familiar URLs, improving branding and trust.
  3. Final Answer:

    To use your own website address instead of a default GCP URL -> Option A
  4. Quick Check:

    Custom domain = personal website address [OK]
Hint: Custom domain means your own website address, not default URL [OK]
Common Mistakes:
  • Confusing custom domain with storage or VM settings
  • Thinking it changes backup or machine names
  • Assuming it increases resource limits
2. Which DNS record type must you configure to point your custom domain to a Google App Engine service?
easy
A. MX record
B. TXT record
C. SRV record
D. CNAME record

Solution

  1. Step 1: Identify DNS record types for domain pointing

    CNAME records map a domain or subdomain to another domain name, commonly used for pointing to cloud services.
  2. Step 2: Match with Google App Engine requirements

    Google App Engine custom domains require CNAME records to link your domain to their service address.
  3. Final Answer:

    CNAME record -> Option D
  4. Quick Check:

    Point domain to service = CNAME record [OK]
Hint: Use CNAME to point domain to cloud service address [OK]
Common Mistakes:
  • Using MX records which are for email routing
  • Using TXT records meant for verification
  • Confusing SRV records which are for service location
3. Given this snippet configuring a custom domain in GCP App Engine, what will happen if the DNS is not properly set?
gcloud app domain-mappings create example.com --certificate-management=automatic
medium
A. The command will fail with a syntax error
B. The domain will be mapped but users cannot access the app via example.com
C. The app will be accessible immediately without DNS changes
D. The SSL certificate will not be issued

Solution

  1. Step 1: Understand domain mapping command effect

    The command creates a domain mapping and requests SSL certificate automatically.
  2. Step 2: Consider DNS role in accessibility

    If DNS records do not point to GCP, users cannot reach the app via the custom domain despite mapping.
  3. Final Answer:

    The domain will be mapped but users cannot access the app via example.com -> Option B
  4. Quick Check:

    Mapping without DNS update = no access [OK]
Hint: Mapping alone doesn't work without DNS pointing [OK]
Common Mistakes:
  • Assuming command fails without DNS
  • Thinking app is accessible immediately
  • Believing SSL won't issue without DNS
4. You tried to add a custom domain to your GCP App Engine app but received an error: "Domain ownership verification failed." What is the most likely cause?
medium
A. You did not add the required TXT record to your domain's DNS
B. You used an incorrect CNAME record type
C. Your App Engine app is not deployed
D. You forgot to enable billing on your GCP project

Solution

  1. Step 1: Understand domain ownership verification process

    GCP requires you to prove you own the domain by adding a TXT record to DNS.
  2. Step 2: Identify cause of verification failure

    If the TXT record is missing or incorrect, verification fails and domain cannot be added.
  3. Final Answer:

    You did not add the required TXT record to your domain's DNS -> Option A
  4. Quick Check:

    Missing TXT record = ownership verification fail [OK]
Hint: Verify domain by adding TXT record in DNS [OK]
Common Mistakes:
  • Confusing CNAME with TXT for verification
  • Assuming app deployment affects verification
  • Thinking billing status causes verification error
5. You want to serve your website on both example.com and www.example.com using GCP App Engine with HTTPS. Which setup correctly achieves this with minimal manual DNS management?
hard
A. Map both domains; create TXT records for SSL; manually upload certificates
B. Map only example.com in App Engine; create A record for www pointing to example.com IP; manually manage SSL
C. Map both domains separately in App Engine and create CNAME for www pointing to ghs.googlehosted.com; use automatic SSL
D. Map www.example.com only; create CNAME for example.com pointing to www; disable SSL

Solution

  1. Step 1: Understand domain mapping for root and www

    Both example.com and www.example.com need mapping to serve content on both URLs.
  2. Step 2: Use recommended DNS and SSL setup

    Google recommends CNAME for www to ghs.googlehosted.com and automatic SSL management for ease and security.
  3. Final Answer:

    Map both domains separately in App Engine and create CNAME for www pointing to ghs.googlehosted.com; use automatic SSL -> Option C
  4. Quick Check:

    Separate mapping + CNAME + auto SSL = best practice [OK]
Hint: Map both domains and use CNAME for www with auto SSL [OK]
Common Mistakes:
  • Using A record for www which is not recommended
  • Mapping only one domain and missing the other
  • Disabling SSL or managing certificates manually unnecessarily
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