Cloud DNS

On this page 7

Cloud DNS is a managed Domain Name System service offered by a cloud provider that hosts authoritative zones, answers name queries from a globally distributed anycast network and lets teams manage records through an API instead of operating their own name servers. In cloud networking, it is the layer that turns names such as api.example.com into the addresses of load balancers, private endpoints and virtual machines.

A typical Cloud DNS offering combines public hosted zones for internet-facing names, private zones that resolve only inside a VPC, and resolver features that connect cloud and on-premises name spaces. Because records change through the same automation that creates infrastructure, DNS becomes part of the deployment pipeline rather than a manual ticket.

How Cloud DNS answers a query

Cloud DNS answers a query by returning the authoritative record for a name from the nearest point of presence of the provider’s network. A recursive resolver, such as the one in a home router or a corporate network, follows the delegation chain from the root servers to the top-level domain and finally to the name server (NS) records that point at the provider.

The provider advertises the same name server addresses from dozens or hundreds of locations through anycast routing, so each query reaches a nearby site and an outage at one location simply shifts traffic elsewhere. Records are stored centrally and propagated to every edge site, usually within seconds to a minute after an API call.

Inside a VPC the flow is different. Virtual machines send queries to a provider-supplied resolver address at a well-known internal IP, and that resolver checks private zones attached to the network before it forwards anything to the public internet. This split lets the same name return a private address internally and a public address externally.

The table below lists the main components involved in resolving a name through a managed service.

ComponentRoleWhere it runs
Hosted zoneHolds all records for one domainProvider control plane
Authoritative name serversAnswer queries for the zoneGlobal anycast edge
VPC resolverRecursive lookups for workloadsInside each virtual network
Inbound endpointAccepts queries from on-premisesCustomer VPC subnet
Outbound endpointForwards queries to external serversCustomer VPC subnet
Record APICreates and changes recordsProvider management plane
Core components of a managed DNS service

Public zones, private zones and record types

Public and private zones differ in who can resolve them: public zones answer anyone on the internet, while private zones answer only networks explicitly associated with them. A private zone can be attached to several VPCs, including networks in other accounts, which is a common pattern in hub-and-spoke designs built around a transit gateway.

Record types are the standard ones defined for DNS, but cloud services add alias records that point a name directly at a provider resource such as a load balancer. An alias follows the resource’s changing IP addresses automatically and, unlike a CNAME, can be used at the zone apex (the bare domain).

Record typePurposeTypical cloud use
A and AAAAMap a name to IPv4 or IPv6Virtual machines, Elastic IP addresses
CNAMEAlias one name to anotherContent delivery and SaaS endpoints
Alias or ANAMEPoint a name at a resourceApex domain on a load balancer
MX and TXTMail routing and verificationEmail, domain ownership proofs
NS and SOADelegation and zone metadataSubdomain delegation to teams
CAARestrict certificate authoritiesControl TLS certificate issuance
Record types frequently managed in Cloud DNS

Time to live (TTL) sets how long resolvers cache an answer. Values of 60 to 300 seconds suit records that may change during failover, while stable records often use 3,600 seconds or more to reduce query volume and cost.

Routing policies and health checks

Routing policies let Cloud DNS return different answers to different clients for the same name. The resolver evaluates the policy at query time, often using the client’s location or a health check that probes the target endpoint every 10 to 30 seconds.

These policies provide coarse traffic steering, but they act only when resolvers request a fresh answer. A cloud load balancer, by contrast, reacts per connection. DNS-based steering is therefore best for regional failover and geographic distribution, not for fine-grained load balancing.

PolicyHow it selects an answerMain limitation
WeightedSplits answers by configured ratiosCached answers skew real ratios
Latency-basedReturns the lowest-latency regionMeasures resolver, not end user
GeolocationMatches the client’s country or continentResolver location may mislead
FailoverReturns secondary when primary is unhealthyRecovery bounded by TTL
MultivalueReturns several healthy addressesClients choose unpredictably
Common routing policies and their trade-offs

The EDNS Client Subnet extension can improve location accuracy, yet not every public resolver sends it, so geographic decisions remain approximate.

Hybrid resolution with on-premises networks

Hybrid resolution connects cloud and data center name spaces through conditional forwarding rules. An outbound endpoint forwards queries for a domain such as corp.example.internal to on-premises DNS servers over a VPN gateway or cloud interconnect, while an inbound endpoint lets on-premises servers query private cloud zones.

This design avoids duplicating records in two places, but it depends on reachable network paths and on firewall rules that allow port 53 over both UDP and TCP. TCP matters because responses larger than the UDP limit, which is common with DNSSEC signatures, fall back to TCP.

Security, reliability and operational limits

Cloud DNS removes the burden of patching and scaling name servers, but it introduces risks that teams must manage deliberately. The most damaging incidents usually come from misconfiguration and weak access control, not from provider outages.

  • DNSSEC signing protects public zones against cache poisoning, but key rotation and the DS record at the registrar must stay consistent, or the domain becomes unresolvable.
  • Dangling records that point at deleted resources enable subdomain takeover; regular audits should remove them.
  • Least-privilege permissions on the record API matter because one changed NS or MX record can redirect traffic or email.
  • Query logging supports threat detection and troubleshooting, complementing VPC flow logs, but it adds storage cost.
  • Provider quotas limit records per zone, zones per account and queries per second from a single instance.

The following table maps frequent failures to their causes and remedies.

SymptomLikely causeFix
Old address returned after changeLong TTL still cachedLower TTL days before migration
Private name fails in one VPCZone not associated with that VPCAttach the zone to the network
Domain fails after DNSSEC changeDS record mismatch at registrarRepublish matching DS record
On-premises cannot resolve cloud namesMissing inbound endpoint or ruleCreate endpoint and forwarding
Subdomain serves foreign contentDangling CNAME to freed resourceDelete or reclaim the target
Typical Cloud DNS problems and fixes

The idea in brief

Every website and service has a name that people can remember and a numeric address that computers use. DNS is the phone book that connects the two. Cloud DNS is that phone book run by a cloud provider for you, copied to many places around the world so it answers quickly and keeps working when one place fails.

It can also keep a private phone book that only your own cloud networks can read. The key idea is simple: you change the entries with code, and the provider makes sure everyone gets the right answer.

A practical scenario

An online retailer runs its storefront in two cloud regions. The team hosts shop.example.com in a public Cloud DNS zone and creates a failover policy: the primary answer is an alias to the load balancer in the first region, and a health check probes its /health path every 10 seconds. The record TTL is 60 seconds.

Internally, a private zone named internal.example.com maps database and cache names to private addresses, and an outbound forwarding rule sends corp.example.internal queries to the company data center through a VPN gateway.

During a regional outage, three consecutive health checks fail and Cloud DNS starts returning the second region’s load balancer. Most customers reach the backup site within about two minutes, and no engineer has to edit a record by hand.