You switched your DNS routing from latency-based to geographic (GeoDNS), expecting users to land on the nearest regional endpoint. Instead, a chunk of users still resolve to a server on the wrong continent. Latency goes up, support tickets come in, and the GeoDNS provider's logs show those users mapped to the correct region — for the resolver's IP, not the user's. The missing piece is almost always EDNS Client Subnet.
How latency-based routing sidesteps the problem
Latency-based DNS routing works by measuring actual round-trip times between the resolver (or the client, depending on implementation) and each regional endpoint. The authoritative DNS server returns the record for whichever region had the lowest measured latency. The key detail: it does not need to know where the client physically sits. It only cares about network performance.
This means a user in Jakarta whose ISP routes through a resolver in Singapore still gets a reasonable answer, because the latency measurement reflects the real network path. Geographic location is irrelevant to the decision.
GeoDNS works differently. It maps the source IP of the incoming DNS query to a geographic location using a GeoIP database, then returns the record for the closest region. The problem: the source IP of the query is usually the recursive resolver's IP, not the end user's IP. If a user in Jakarta sends queries through a public resolver whose egress IP is in the US, GeoDNS sees a US IP and returns the US endpoint.
With latency-based routing, this mismatch was invisible because performance measurement compensated for it. Switch to GeoDNS, and the mismatch surfaces immediately.
What EDNS Client Subnet actually does at the wire level
EDNS Client Subnet (ECS) is an extension to the DNS protocol defined in RFC 7871. It lets a recursive resolver include a truncated version of the client's IP address in the DNS query it sends to the authoritative server.
Here is the flow, step by step:
- A user at IP 203.0.113.47 asks their recursive resolver to look up
app.example.com. - The recursive resolver constructs a DNS query to the authoritative nameserver for
example.com. If ECS is enabled, it adds an EDNS0 OPT record containing the client's subnet — typically a /24 for IPv4 (so203.0.113.0/24), stripping the last octet for privacy. - The authoritative server receives the query. If it supports ECS, it uses the client subnet (not the resolver's IP) to look up the geographic location and pick the right regional record.
- The authoritative server responds with the DNS answer and includes a
SCOPE PREFIX LENGTHin the ECS response, telling the resolver how broadly it can cache this answer. For example, a scope of /16 means the answer is valid for any client in the203.0.0.0/16range. - The recursive resolver caches the answer, keyed not just by domain name but also by the client subnet prefix. Future queries from a different subnet trigger a new upstream lookup.
Without ECS, step 2 sends a plain query with no client information. The authoritative server sees only the resolver's IP — which might be on a different continent from the actual user.
Why some resolvers do not send ECS
ECS is not universally supported or enabled. There are legitimate reasons resolvers skip it:
Privacy. Forwarding even a truncated client IP to authoritative servers leaks information about which subnet is querying which domain. Some resolver operators consider this a privacy risk and disable ECS by policy.
Cache efficiency. Without ECS, a resolver caches one answer per domain and serves it to all clients. With ECS, it must maintain separate cache entries per client subnet per domain. This multiplies memory usage and reduces cache hit rates significantly.
No obligation. RFC 7871 is not mandatory. Resolvers can ignore it entirely and remain compliant.
The practical result: Google Public DNS (8.8.8.8) typically forwards ECS to authoritative servers. Cloudflare's 1.1.1.1 generally does not, citing privacy. Quad9 (9.9.9.9) has its own policy that may differ. ISP resolvers vary wildly — many have never heard of ECS.
This means your GeoDNS setup works perfectly for users behind Google DNS and fails for users behind 1.1.1.1 or a local ISP resolver that does not send ECS. Those users get mapped to wherever the resolver's IP geolocates.
Diagnosing the problem
First, check whether your authoritative DNS server is receiving ECS data at all. If you control the authoritative server, enable query logging and look for the CLIENT-SUBNET or ECS field in incoming queries. The exact log format depends on your DNS server software.
From the client side, you can simulate an ECS-aware query using dig (version 9.11 or later supports the +subnet flag):
dig @8.8.8.8 app.example.com A +subnet=203.0.113.0/24
This tells Google's resolver to include the specified subnet in the ECS option when querying your authoritative server. Compare the answer you get with a plain query:
dig @8.8.8.8 app.example.com A
If both return the same regional endpoint, ECS might not be changing the answer — either your authoritative server ignores ECS, or the GeoIP mapping for both the resolver and the test subnet points to the same region. Try a subnet from a different continent to see if the answer changes.
To check what a resolver without ECS produces, query through one that is known to not send it:
dig @1.1.1.1 app.example.com A
If this returns a different (wrong) region compared to the +subnet query, you have confirmed the ECS gap.
The cache interaction that makes it worse
ECS does not just affect the initial lookup. It changes how caching works.
A resolver that supports ECS caches answers per subnet prefix. A resolver that does not support ECS caches one answer for the domain, regardless of which client asked. Once that single answer is cached, every client behind that resolver gets the same regional endpoint until the TTL expires.
This means the first user to trigger a cache miss determines the answer for everyone behind that resolver. If the resolver's IP geolocates to Frankfurt, all users behind it — whether they sit in Frankfurt or in Tokyo — get the Frankfurt endpoint for the duration of the TTL.
Lowering TTL does not fix this. It only shortens the window. The fundamental problem remains: without ECS, the resolver has no per-subnet cache entries, so geographic routing cannot work correctly. If you want to understand more about how TTL interacts with resolver caching behavior, the article Lowered DNS TTL Before Migration, but Visitors Still Hit the Old Server covers the caching side in detail.
What you can actually do about it
There is no way to force third-party resolvers to enable ECS. Your options:
Accept the gap and plan around it. Understand that GeoDNS will misroute users behind non-ECS resolvers. If your user base mostly uses resolvers that support ECS (check your query logs), the impact may be small enough to tolerate.
Use a hybrid approach. Some DNS providers let you combine geographic routing with health checks or performance measurements. The geographic mapping handles ECS-aware resolvers correctly, and a fallback mechanism catches the rest. The specifics depend on your DNS provider — check their documentation for whether they support weighted or performance-based fallback alongside GeoDNS.
Go back to latency-based routing. If the ECS gap affects too many users, latency-based routing might simply be the better tool. It was working before for a reason: it does not depend on knowing the client's location, only on measuring actual network performance.
Encourage users to use ECS-capable resolvers. This is impractical for public-facing services but sometimes viable for internal or enterprise applications where you control the resolver configuration.
Monitor the mismatch. Add application-level checks. When a user connects to your regional endpoint, compare their actual IP geolocation (at the application layer) with the region they landed on. Log mismatches. This gives you data on how many users are affected and which resolvers are the source.
The core takeaway: latency-based routing and GeoDNS solve the same problem (route users to the nearest region) using fundamentally different signals. Latency routing uses measured performance and tolerates resolver location mismatches. GeoDNS uses IP geolocation and breaks when the IP it sees belongs to the resolver instead of the user. EDNS Client Subnet bridges that gap, but only when every resolver in the chain supports it — and today, many do not. Before switching routing strategies, check your query logs for ECS coverage. If a significant portion of your traffic comes through resolvers that strip or never send ECS, GeoDNS will misroute those users, and no amount of GeoIP database tuning will fix it.