Using Cloud DNS and Domain Mapping in GCP – Routing Traffic to Your Services

Gcp RSH NETWORK February 03, 2026 2 mins read

This guide explains how to set up Cloud DNS and domain mapping in GCP to direct traffic to your applications.

1. Introduction

Cloud DNS is Google Cloud’s scalable, reliable, and fully managed Domain Name System service. It allows organizations to publish domain names and route traffic efficiently to GCP services.

Domain mapping enables you to connect your custom domain to applications hosted on GCP such as App Engine, Cloud Run, or Load Balancers—ensuring users reach your services using familiar URLs.

 


2. What Is Cloud DNS?

Cloud DNS is an authoritative DNS service designed for performance and global availability.

Key Features:

  • High-performance, globally distributed DNS

  • Supports public and private DNS zones

  • Seamless integration with:

    • HTTP(S) Load Balancers

    • App Engine

    • Cloud Run

    • GKE services


3. Creating a DNS Zone

To manage DNS records, you must first create a DNS zone.

Steps:

  1. Go to Network Services → Cloud DNS

  2. Click Create Zone

  3. Enter a Zone Name (e.g., my-zone)

  4. Choose Public or Private

  5. Enter the DNS Name (e.g., example.com.)

  6. Click Create

This zone becomes the authoritative source for your domain in GCP.

 


4. Adding DNS Records

DNS records define how traffic is routed.

Common Record Types:

  • A Record – Maps a domain to an IPv4 address

  • CNAME Record – Maps a subdomain to another domain

  • MX Record – Handles email routing

  • TXT Record – Used for verification, SPF, DKIM

Example: A Record

Name: www  

Type: A  

TTL: 300  

IPv4 Address: 34.123.45.67

 


5. Domain Mapping to GCP Services

🔹 App Engine

  1. Verify domain ownership using Google Search Console

  2. Add the required DNS records

  3. Map the domain using CLI:

gcloud app domain-mappings create www.example.com

 


🔹 Cloud Run / HTTP(S) Load Balancer

  • Point your domain to the Load Balancer’s external IP

  • Manage DNS records using Cloud DNS

  • Enable SSL certificates for HTTPS (Google-managed recommended)


6. Best Practices

  • Use low TTL values during testing, increase for production

  • Enable DNSSEC for DNS security

  • Monitor propagation using:

    • dig

    • nslookup

  • Use Google-managed SSL certificates

  • Keep domain ownership verified in Search Console


7. Visual Guide (Image Suggestions)

  • Screenshot: Cloud DNS zone creation

  • Diagram: Domain → DNS → GCP Service

  • Infographic: Verify → Map → Route → Secure


8. Conclusion

Cloud DNS and domain mapping are essential building blocks for routing traffic to GCP-hosted services. By properly configuring DNS zones, records, and domain mappings, you ensure reliable, secure, and scalable access to your applications.

 

Advertisement

R
RSH NETWORK

33 posts published

Sign in to subscribe to blog updates