Skip to content
AdminKit

EDNS Client Subnet (ECS)

What is EDNS Client Subnet (ECS)?

EDNS Client Subnet (ECS), an EDNS0 option defined in RFC 7871, lets a recursive resolver forward part of a querying client's IP address to an authoritative server so it can return a geographically closer answer. AdminKit's guide to resolver-dependent DNS answers covers ECS as one of the ordinary, non-broken reasons a domain resolves differently.

By AdminKit team, Netbase JSC · Updated

EDNS Client Subnet (ECS) is an EDNS0 option, defined in RFC 7871 and registered as option code 8 in IANA’s DNS Parameters registry, that lets a recursive resolver forward a truncated portion of the original client’s IP address — not the resolver’s own address — to an authoritative nameserver along with a query. Without it, an authoritative server answering a query from a large public resolver like Google’s or Cloudflare’s only sees that resolver’s own location, which can be far from the actual client, so a CDN or geo-load-balanced service has no reliable way to return the nearest server’s address — Google’s own Public DNS documentation describes exactly this tradeoff for its resolver. Not every public resolver makes the same choice: Cloudflare’s 1.1.1.1 FAQ states that 1.1.1.1 does not send EDNS Client Subnet, describing itself as a privacy-focused resolver that does not include client IP information in its queries to authoritative servers. ECS fixes that by exposing enough of the client’s subnet for geo-steering to work, at the cost of forwarding a little of that client’s location to every authoritative server in the resolution path. It’s one of the ordinary, non-broken reasons the same domain can resolve to a different address depending on which resolver and which network a query comes from. See the EDNS0 entry, defined in RFC 6891, for the extension mechanism ECS and other options like DNS Cookies attach to.

AdminKit groups eDNS Client Subnet (ECS) under its DNS cluster — browse the AdminKit glossary index for other related terms.

Frequently asked questions

What address does a resolver forward under ECS?

A truncated portion of the original client's IP address, not the resolver's own address, so the authoritative server sees enough of the client's subnet for geo-steering.

Why does ECS matter for a resolver like Google's or Cloudflare's?

Without it, an authoritative server answering a query from a large public resolver only sees that resolver's own location, which can be far from the actual client, so a CDN has no reliable way to return the nearest server's address.

Is a domain resolving differently depending on the resolver always a sign of a problem?

No -- ECS-driven geo-steering is one of the ordinary, non-broken reasons the same domain can resolve to a different address depending on which resolver and network a query comes from.

What extension mechanism does ECS attach to?

EDNS0, defined in RFC 6891, the same extension mechanism other options like DNS Cookies use.