An employee in Madrid opens a service and reaches London even though the service has a Madrid endpoint. The first place to look is where the employee’s DNS query entered the authoritative service. A company resolver or VPN can put that location in a different country.
Identify the location signal
An authoritative server normally sees the address of the recursive resolver that sent the query. A resolver that supports EDNS Client Subnet can include a prefix representing part of the client network. Support is optional and the prefix is a coarse signal with privacy implications. A country, ASN or prefix rule works only with the information available to the authority.
Give unmatched traffic somewhere to go
For two partner networks with dedicated endpoints, configure the matching network rules and an explicit default for other resolvers. Cloud DNS evaluates its routing rules, called pickers, in order. After adding a region, query from each partner network and a third network that should receive the default answer.
| Observed input | Intended answer |
|---|---|
| Known partner network | Its designated regional endpoint, if eligible. |
| Unmapped resolver prefix | The configured default endpoint. |
| Matched region has no healthy endpoint | The documented fallback for this workload. |
Test from the networks that matter
Collect test results from a home connection, a mobile network and the corporate VPN used by customers. Record the recursive resolver, returned address and application response for each. Compare results with regional server logs. If the workload has a legal or contractual placement requirement, enforce that requirement in the application and its data systems.
Sources & further reading
Reader questions
Why can two colleagues receive the same regional answer?
Their devices may use the same recursive resolver. One cached answer can also serve subsequent clients within the scope of that answer.
Can I treat the selected endpoint as proof of a visitor’s location?
The result describes a DNS policy decision. VPNs, forwarding resolvers and shared caches can separate the observed network from the visitor.
When does ASN steering help?
It can express a network-specific exception when two networks in the same country need different endpoints. Maintain a usable default for addresses outside the rule.
