EDNS

Extension Mechanisms for DNS

This text was analyzed, written and translated by artificial intelligence (AI). It may contain mistakes.How we use AI

An extension to the original DNS Domain Name System The internet's directory that links domain names to computer addresses. Full definition of DNS protocol that lets DNS messages be larger and carry extra options. DNSSEC Domain Name System Security Extensions Digital signatures that prove DNS answers are genuine and unchanged. Full definition of DNSSEC depends on it, and it also carries features such as hints about the user's network. Servers and firewalls that handle it badly can cause lookups to fail.

category
DNS and technical foundations

Updated on 5 min read

EDNS, short for Extension Mechanisms for DNS, is an add-on to the DNS protocol that lets the two sides of a lookup say what they can handle. Its best-known job is allowing answers larger than the 512-byte limit set in 1987. DNSSEC depends on it, and servers or firewalls that handle it badly can make lookups fail.

What EDNS is

EDNS was first specified in RFC Request for Comments A numbered document in the series recording the internet's technical standards and practices. Full definition of RFC 2671 in August 1999. The current specification is RFC 6891, published by the IETF Internet Engineering Task Force The open body that writes internet standards such as DNS, EPP and RDAP. Full definition of IETF in April 2013. It replaced RFC 2671 and is an Internet Standard (STD 75). As of October 2026, no later RFC has replaced it.

The name is often written EDNS0 or EDNS(0). The 0 is the version number, and version 0 is the only one RFC 6891 defines.

EDNS gives a DNS exchange what the original protocol lacked: a way to announce a larger message size, room for more flags and response codes, and optional extras called options. It is backward compatible: if an asker finds that a server does not support EDNS, it may ask again without it.

Why the original DNS message size was too small

RFC 1035, from November 1987, limited DNS messages sent over the User Datagram Protocol (UDP), the fast, connectionless way most DNS questions travel, to 512 bytes. A longer answer is cut short and marked with the TC (truncation) flag. The asker then has to repeat the question over the Transmission Control Protocol (TCP), which costs time and adds load on servers.

Answers grew. AAAA record A DNS record that points a domain name to an IPv6 address. Full definition of AAAA record, RRSIG Resource Record Signature The DNS record that carries a DNSSEC signature for a set of records. Full definition of RRSIG and keys, and long TXT record Text record A DNS record holding text, often for domain verification and email security. Full definition of TXT record all add bytes, and RFC 6891 notes that DNSSEC records frequently need a much larger response than 512 bytes can hold. TCP remains the fallback: RFC 7766 (March 2016) requires all general-purpose DNS software to support both UDP and TCP.

How EDNS works in plain words

  1. The asker adds one special entry, called the OPT pseudo-record (type 41), to its question. It carries no real DNS data and is never cached.
  2. In it, the asker states the largest UDP answer it can receive (any value below 512 counts as 512), the EDNS version, some flags, and any options. Each option is a code, a length and some data.
  3. A server that understands EDNS includes its own OPT record in the reply.
  4. If the answer still does not fit, the server truncates it and the asker retries over TCP.

IANA Internet Assigned Numbers Authority The functions that coordinate the root zone, IP addresses and protocol numbers. Full definition of IANA keeps a public registry The central database and system of a top-level domain, or loosely the organization that runs it. Full definition of registry of option codes. Examples listed there include NSID (which server answered), COOKIE, Padding, Extended DNS Error and edns-client-subnet. Client Subnet passes part of the user’s network address so that a server can tailor its answer. RFC 7871, which describes it, is Informational rather than a standard, and recommends that the feature be off by default because of known privacy and operational shortcomings.

EDNS does not make DNS secure or private by itself. It only carries the signals and options that other mechanisms use.

How large is large enough

The advice on size has changed. RFC 6891 (2013) suggested 4096 bytes as a starting point. Large UDP messages, however, may be split into fragments when they are too big for the network path. If one fragment is lost, or a firewall drop The moment a deleted domain becomes available to register again. Full definition of drop fragments, the whole answer is lost.

DNS Flag Day 2020 proposed 1232 bytes: the 1280-byte minimum link size that IPv6 requires, minus 48 bytes of headers. RFC 9715, published in January 2025 as an Informational document, recommends a maximum of 1400 bytes, with smaller values allowed. None of these figures is a single required size. RFC 9715 also asks zone operators to keep answers small, for example with fewer name server A server that holds a domain's DNS records and answers lookups. Full definition of name server.

Why DNSSEC depends on it

DNSSEC answers carry signatures (RRSIG records) and keys (DNSKEY record A DNS record holding a public key used to check a zone's DNSSEC signatures. Full definition of DNSKEY record), so they are much larger than plain answers. A resolver The DNS server that looks up domain names on behalf of users. Full definition of resolver asks for DNSSEC data by setting the DNSSEC OK (DO) bit, defined in RFC 3225 (December 2001). That bit exists only inside the EDNS record, so without EDNS a resolver cannot ask for DNSSEC data at all.

RFC 4035 (March 2005) requires DNSSEC-aware name servers to support EDNS and messages of at least 1220 bytes, and recommends support for 4000 bytes. RFC 6891 adds that when DNSSEC is needed, a resolver should not fall back to plain DNS without EDNS.

DNS Flag Day and broken servers

Some authoritative server A DNS server that gives the official answers for a domain or zone. Full definition of authoritative server, firewalls and load balancers dropped or mishandled queries that carried EDNS. RFC 8906 (September 2020), a Best Current Practice (BCP 231), describes the effect. A resolver cannot tell a lost packet from a dropped EDNS query, so it may wrongly conclude that EDNS is not supported and fall back to plain DNS, which can make DNSSEC validation A resolver's check that a DNS answer is correctly signed with DNSSEC. Full definition of DNSSEC validation fail. RFC 8906 asks firewalls and load balancers to pass DNS packets they do not understand or to return a proper error, not to drop them.

DNS Flag Day was a coordinated response by DNS software and service providers. On or around 1 February 2019, resolver software and public resolvers stopped retrying without EDNS after a timeout, so servers that do not answer EDNS queries at all are treated as dead, and their domains may become unreachable. A second DNS Flag Day, on 1 October 2020, targeted fragmentation: it asked operators to answer DNS over TCP and to use the 1232-byte default, and resolvers to retry over TCP after a truncated reply.

For a domain owner the practical point is simple: the servers that answer for the domain, and any firewall in front of them, need to answer EDNS queries correctly and also answer over TCP.

A worked example

A resolver looks up example.com and wants DNSSEC data. It sends a UDP question with an OPT record saying it can take up to 1400 bytes, with the DO bit set. The authoritative server for example.com replies with the address, its signatures and its own OPT record.

If the signed answer would exceed 1400 bytes, the server sends a truncated reply with the TC flag set, and the resolver asks again over TCP. If a firewall in front of the server silently drops the EDNS question, the resolver gets no reply, may retry without EDNS, and can then no longer validate the signatures.

Sources