AXFR Zone Transfers: How to Synchronise Secondary DNS Safely
Adding a secondary DNS provider can improve availability, but the backup nameservers are useful only when they have an accurate copy of the zone. An AXFR zone transfer is the standard full-copy mechanism for moving DNS records from a primary server to a secondary server. It is straightforward in principle, yet a small configuration error can leave the secondary serving stale data or expose the entire zone to an unintended requester.
What AXFR Copies
AXFR transfers the contents of one DNS zone, not every zone on a server. The secondary requests the zone and receives a sequence of DNS messages containing its records. This is different from an ordinary lookup for one name. The transfer starts and ends with the zone’s SOA record, which helps delimit a complete response. A secondary may also use incremental transfer where supported, but AXFR remains important for an initial copy or when a full refresh is needed.
If you are new to this arrangement, our secondary DNS overview explains why an independent authoritative service can add resilience. The transfer itself still needs careful access control.
Allow Only the Intended Secondary
On the primary server, restrict zone transfers to the secondary provider’s published transfer addresses. Avoid a blanket rule that lets arbitrary hosts request AXFR. If both systems support transaction authentication, consider TSIG as an additional check; an IP allowlist alone does not authenticate the contents of a transfer. Keep firewall rules narrow while permitting TCP port 53 between the relevant servers. Test from the actual secondary addresses, not just from an administrator’s laptop.
Provider details matter. For example, the ClouDNS guide to AXFR with a Secondary zone identifies the transfer and notification IP addresses in its Primary Settings and explains the required primary-side allowances. Use the current addresses shown in your own zone settings rather than copying an old example from a blog post.
Keep Updates Moving
The primary’s SOA serial should change when zone data changes, allowing secondaries to recognise a newer version. Review the SOA refresh, retry and expire values as part of the design: they affect how a secondary checks for changes and how long it may continue serving data when the primary cannot be reached. Our SOA record guide covers those timers in more detail.
Notifications can prompt a secondary to check sooner, but they do not replace a working transfer path. After editing a record, compare authoritative answers from the primary and secondary directly. Do not rely on a recursive resolver for this test, because its cached answer can hide whether the secondary has updated.
Verify and Monitor the Result
Confirm that the initial AXFR completes, the secondary reports the expected serial, and a later controlled change appears there too. Watch transfer errors, authentication failures and serial differences. If a transfer stops working, check the allowlist, firewall, TCP reachability and primary logs before changing public delegation. Restricting AXFR should protect the zone without preventing your authorised backup from receiving updates.
For the protocol-level definition of full zone transfer, consult RFC 5936: DNS Zone Transfer Protocol (AXFR).