AXFR
acronymKept in this browser · My desk
Stands for: Authoritative Transfer (full zone transfer)
AXFR, "Authoritative Transfer" in RFC 9499, is the DNS query type 252 that asks an authoritative server for a complete copy of a zone, answered over TCP as a stream of messages that begins and ends with the zone's SOA record.
AXFR is the full zone transfer of the Domain Name System (DNS): a secondary sends one query with QTYPE 252 over TCP and receives every record of the zone, bracketed by the same SOA (start of authority) record at the start and the end. It is how a new secondary gets its first copy and how any secondary recovers when incremental history is missing, and it is also what an attacker tries first against a careless server, since an open AXFR lists every name in the zone.
What it is. AXFR is query type 252, listed in RFC (Request for Comments) 1035 of 1987 as "A request for a transfer of an entire zone" and re-specified in full by RFC 5936 in June 2010, which updated RFC 1034 and RFC 1035 and is itself updated by RFC 9103. The RFC Editor's records list RFC 1035 as an Internet Standard updated by 29 later documents and RFC 5936 as a Proposed Standard. RFC 9499 expands the name as "Authoritative Transfer". The query is an ordinary DNS (Domain Name System) message with one question: the zone's name, class IN and type AXFR.
Where it came from. AXFR is as old as the DNS. RFC 883 (P. Mockapetris, November 1983) already listed "AXFR 252 A request for a transfer of an entire zone of authority" and described the exchange: the requestor first asks for the SOA, compares serials and, only if they differ, sends the AXFR; the server then sent "each node from the zone to the requestor in a separate message", starting with the node that holds the SOA, walking the tree "in breadth-first order" and finishing by "resending the node containing the SOA record". A server that wished "to forbid zone copies" answered Refused. RFC 5936 kept the SOA brackets but lets a server fill each message with many records, up to 65,535 octets; it keeps one record per message only as a configurable concession to "some old AXFR clients", with "multiple records per message" as the default.
The rules on the wire. AXFR is "restricted to TCP" (Transmission Control Protocol); over TCP each message carries a two-octet length prefix, so no message can exceed 65,535 octets, "This limit is not changed by EDNS0", and "the TC (truncation) bit is never set by an AXFR server" (RFC 5936, section 2). The answer is "a series (which could be a series of length 1) of DNS messages": the first begins with the zone's SOA (start of authority) record, the last ends with the same SOA, and no intermediate message contains it (section 2.2). Every message copies the query's ID (identifier), sets AA (Authoritative Answer), keeps NSCOUNT at 0, and between the two SOAs the records may arrive in any order, since the zone is a set. Name compression must preserve case, unlike in ordinary answers (section 3.4). An error ends the session with one message carrying the RCODE (response code) and the question; a server that is not authoritative should answer NotAuth (9). A client must load the result atomically and keep serving the previous version if anything fails (section 6).
A query, octet by octet. Over TCP every DNS message is preceded by a two-octet length. An AXFR query for example.com is 31 octets on the wire: 00 1d (the length, 29), then a 12-octet header (a 16-bit identifier, a flags word of 00 00 for a plain query, QDCOUNT 00 01 and the three other counts at zero), the name as labels 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00, the type 00 fc (252) and the class 00 01 (IN). Every response message repeats the identifier, sets QR (the query or response bit) and AA in the flags (84 00), and copies the question in at least the first message; the answer section then carries the SOA, the zone's records in any order and, in the last message, the SOA again.
Connections. RFC 5936 corrected an old assumption that one TCP connection carries one transfer: servers "MUST be able to handle multiple AXFR sessions on a single TCP connection", and a client can cancel a transfer only by closing the connection. RFC 9103 adds that AXFR and IXFR to the same primary should share a connection, that a server at its transfer limit should answer SERVFAIL, and that an AXFR request carrying an OPT record must get an OPT in every response message. Over DNS over QUIC (RFC 9250) each transfer has its own stream and can be cancelled alone.
The security story. Because one query returns every name, an open AXFR is reconnaissance handed out for free. RFC 5936 asks that implementations offer address and key controls and not default to "open to all"; the alert TA15-103A of US-CERT (the United States Computer Emergency Readiness Team) (13 April 2015) found many servers still answering anyone and advised answering "only to zone transfer (AXFR) requests from known IP addresses". The alert expands AXFR as "Asynchronous Transfer Full Range", an expansion found in no RFC. In June 2017 ISC (Internet Systems Consortium) disclosed CVE-2017-3142 (Common Vulnerabilities and Exposures), which let an attacker who knew a valid TSIG (Secret Key Transaction Authentication for DNS) key name obtain a zone from BIND without the key, and advised requiring both address and key. XoT (RFC 9103) encrypts the transfer with TLS 1.3 on port 853.
Who may ask. The defaults of today's servers refuse strangers. BIND 9.21 documents allow-transfer as none when unset; PowerDNS lets only 127.0.0.0/8 and ::1 transfer without a TSIG key (allow-axfr-ips) and can switch transfers off with disable-axfr; NSD answers only the addresses and keys listed in provide-xfr, and BLOCKED overrides every other entry; Knot DNS requires an acl with the transfer action; Windows Server offers NoTransfer, TransferAnyServer, TransferToZoneNameServer and TransferToSecureServers per zone. NSD, its manual says, discards requests from unlisted or BLOCKED addresses and provides no data; an open server, by contrast, returns the whole zone in a single exchange.
Tools. BIND's dig asks with "dig @server zone AXFR", and the manual notes that "AXFR queries always use TCP"; host -l lists a zone by transfer; Windows nslookup does the same with ls -d, while BIND's nslookup does not implement ls. In Brazil, Registro.br's 2007 talk on firewalls and DNS lists zone transfers first among the cases that need TCP port 53 open to an authoritative server.
How it differs. AXFR is the full copy: one query, the whole zone, SOA to SOA. IXFR (type 251) asks for differences and falls back to an AXFR-shaped answer when it cannot give them; NOTIFY (opcode 4) only invites the secondary to check; "zone transfer" names the whole process of which AXFR is one tool. AXFR is also the only one of them that an outsider can use for reconnaissance, since it returns every name at once.
Also known as: authoritative transfer, full zone transfer, qtype 252
Sources
- IETF, RFC 1035, Domain names: implementation and specification (P. Mockapetris), November 1987 (read 2026-11-23): QTYPE 252 AXFR, the message format, compression, the TCP length prefix and the master file format of section 5
- IETF, RFC 5936, DNS Zone Transfer Protocol (AXFR) (E. Lewis, A. Hoenes, ed.), June 2010 (read 2026-11-23): TCP only, header values, SOA at start and end, unordered contents, 65535-octet messages, no open-to-all default, atomic loading
- IETF, RFC 9499 (BCP 219), DNS Terminology (P. Hoffman, K. Fujiwara), March 2024 (read 2026-11-23): resolver, stub, iterative and recursive modes, full-service, forwarder, policy-implementing, open and validating resolvers; zone transfer, AXFR, IXFR; DoQ; anycast and instance
- IETF, RFC 9103, DNS Zone Transfer over TLS (W. Toorop, S. Dickinson, S. Sahib, P. Aras, A. Mankin), August 2021 (read 2026-11-23): cleartext transfers leak zones, XoT on TLS 1.3 and port 853, connection reuse, IXFR over TCP by default in BIND and NSD, NOTIFY leakage, padding, ZONEMD
- US-CERT (CISA), Alert TA15-103A, DNS Zone Transfer AXFR Requests May Leak Domain Information, 13 April 2015 (read 2026-11-23): open AXFR reveals internal structure; answer only known addresses
- ISC, CVE-2017-3142, An error in TSIG authentication can permit unauthorized zone transfers, 29 June 2017 (read 2026-11-23): AXFR and NOTIFY accepted without valid TSIG by an attacker knowing a key name; CVSS 5.3; mitigation by address and key together
- ISC, BIND 9 manual pages, 9.21.29-dev documentation (read 2026-11-23): dig AXFR and ixfr=N, +nsid, -k and -y; host -l; nslookup ls not implemented; nsupdate prereq and update commands
- Registro.br (Hugo Koji Kobayashi), Firewalls e DNS, 30 June 2007, slides (read 2026-11-23): AXFR uses TCP; authoritative servers must accept UDP and TCP 53; separate authoritative and recursive servers and restrict recursion to one's own clients
- IETF, RFC 883, Domain names: implementation and specification (P. Mockapetris), November 1983, obsoleted by RFC 1034 and 1035 (read 2026-11-23): QTYPE AXFR 252; the secondary's SOA query and SERIAL comparison; each node sent in its own message, breadth first, beginning and ending with the SOA node; Refused for policy reasons; the transfer repeated when the two SOA serials differ; the old copy answers until the new one is complete
- RFC Editor, RFC 1035 record, JSON metadata (read 2026-11-23): Internet Standard, November 1987; obsoletes RFC 882, 883 and 973; updated by 29 RFCs, among them 1995, 1996, 2136, 2845, 3658, 4033 to 4035, 5936 and 7766
- RFC Editor, RFC 5936 record, JSON metadata (read 2026-11-23): Proposed Standard, June 2010; updates RFC 1034 and 1035; updated by RFC 9103; copy taken at 18:00 by the DNS research
- ISC, BIND 9 Administrator Reference Manual, Configuration Reference, allow-transfer and max-journal-size, 9.21.29-dev (read 2026-11-23): allow-transfer default none, outgoing transfers disabled; transfers only over the TCP and TLS transports; max-journal-size removes the oldest transactions near the limit, at most 2 gigabytes, small values rounded up to 4096 bytes; copy taken at 18:01 by the DNS research
- PowerDNS, Authoritative Server settings, documentation (read 2026-11-23): allow-axfr-ips default 127.0.0.0/8 and ::1 for AXFR without TSIG; disable-axfr; also-notify; only-notify default 0.0.0.0/0 and ::/0; allow-notify-from default 0.0.0.0/0 and ::/0; dnsupdate default no; allow-dnsupdate-from default 127.0.0.0/8 and ::1; dnsupdate-require-tsig (5.0.0) default no; server-id, default the hostname, returned for NSID; primary and secondary, called master and slave before 4.5.0
- NLnet Labs, nsd.conf(5), NSD documentation, latest (read 2026-11-23): provide-xfr, request-xfr (AXFR and UDP flags, tls-auth for XFR-over-TLS on port 853), allow-notify and notify with a key, NOKEY or BLOCKED; notify-retry; allow-axfr-fallback default yes; store-ixfr default no, ixfr-number 5, ixfr-size 1048576, create-ixfr; identity for CH TXT ID.SERVER; nsid as hex or with the ascii_ prefix
- CZ.NIC, Knot DNS configuration reference, latest documentation (read 2026-11-23): nsid default the FQDN hostname at start; acl actions query, notify, transfer and update; notify-delay default 0; provide-ixfr default on; zonefile-load difference; quic default off and quic-port 853
- Microsoft, Set-DnsServerPrimaryZone, Windows Server DnsServer PowerShell module documentation (read 2026-11-23): DynamicUpdate None, Secure or NonsecureAndSecure, update security only for Active Directory-integrated zones; SecureSecondaries NoTransfer, TransferAnyServer, TransferToZoneNameServer, TransferToSecureServers; Notify NoNotify, Notify, NotifyServers; ReplicationScope Forest, Domain or Custom