CNAME chasing refers to performing multiple DNS queries following one or more CNAME record answers from an initial query. A completely chased CNAME record answer includes at least one CNAME record answer and a final non-CNAME record answer.
Authoritative and recursive DNS resolvers perform CNAME chasing as part of their
operation. Cloud DNS has its own CNAME chasing behavior rules which are
described on this page. The Cloud DNS CNAME chasing behavior applies to
VMs that use the metadata server IP address (169.254.169.254) as their name
server, except when an alternative name server is defined in an outbound server
policy.
Throughout this page, the term private zone means one of the following types of zones: a private zone with records, a forwarding zone, or a peering zone.
CNAME chasing behavior before January 5, 2027
The following tables describe the current Cloud DNS CNAME chasing behavior, in effect before January 5, 2027.
Chasing single CNAME record answers
| Source of single CNAME record answer | Cloud DNS resolver behavior |
|---|---|
| Cloud DNS response policy rule with a single CNAME record |
Cloud DNS response policy rules that contain CNAME information in their local data can only contain a single CNAME record. Cloud DNS doesn't chase the CNAME record by performing any subsequent queries. |
| Single CNAME record from a private zone with records |
Cloud DNS tries to chase the CNAME record by performing subsequent queries in this order:
|
| Single CNAME record from a private forwarding zone |
Cloud DNS doesn't chase the CNAME record by performing any subsequent queries. |
| Single CNAME record from a peering zone |
Cloud DNS tries to chase the CNAME record by performing subsequent queries in this order:
|
| Single CNAME record from a public zone |
Cloud DNS tries to chase the CNAME record by performing subsequent queries in this order:
|
Handling completely chased CNAME record answers
| Source of completely chased CNAME record answer | Cloud DNS resolver behavior |
|---|---|
| Completely chased CNAME record from a private zone with records, forwarding zone, or peering zone | Cloud DNS returns the completely chased CNAME record. |
| Completely chased CNAME record from a public zone | Cloud DNS returns the completely chased CNAME record. |
CNAME chasing behavior starting January 5, 2027
The following tables describe the Cloud DNS CNAME chasing behavior starting January 5, 2027. For more information about those changes, see the announcement.
Chasing single CNAME record answers
| Source of single CNAME record answer | Cloud DNS resolver behavior |
|---|---|
| Cloud DNS response policy rule with a single CNAME record |
Cloud DNS response policy rules that contain CNAME information in their local data can only contain a single CNAME record. Cloud DNS tries to chase the CNAME record by performing subsequent queries according to the VPC name resolution order of the VPC network. |
| Single CNAME record from a private zone with records or a forwarding zone |
Cloud DNS tries to chase the CNAME record by performing subsequent queries according to the VPC name resolution order of the VPC network. |
| Single CNAME record from a peering zone |
Cloud DNS tries to chase the CNAME record by performing subsequent queries in this order:
|
| Single CNAME record from a public zone |
Cloud DNS tries to chase the CNAME record by performing subsequent queries according to the VPC name resolution order of the VPC network. |
Handling completely chased CNAME record answers
| Source of completely chased CNAME record answer | Cloud DNS resolver behavior |
|---|---|
| Completely chased CNAME record from a private zone with records, forwarding zone, or peering zone | Cloud DNS returns the completely chased CNAME record. |
| Completely chased CNAME record from a public zone |
Cloud DNS tries to chase the first CNAME record in the chain by performing subsequent queries according to the VPC name resolution order of the VPC network. If chasing the first CNAME record in the chain doesn't produce a record
or For example, suppose Cloud DNS receives the following completely chased CNAME record answer from a public zone: ;; ANSWER SECTION: www.example.com. 227 IN CNAME cdn-provider.com. cdn-provider.com. 136 IN CNAME cdn-edge.com. cdn-edge.com. 77 IN CNAME customer.edge-provider.com. customer.edge-provider.com. 10 IN A 203.0.113.47 Cloud DNS does the following:
|
What's next
- To find solutions for common issues that you might encounter when using Cloud DNS, see Troubleshooting.