Primary, secondary and zone transfers
Replication between authoritative servers
Traditional DNS (BIND-style) has one primary (formerly "master") where the zone is edited, and secondaries ("slaves") that hold read-only copies. All are equally authoritative to clients; having several on different networks provides redundancy.
Zone transfers
- AXFR — full zone transfer (every record).
- IXFR — incremental transfer (only changes since a serial).
- Both run over TCP port 53 (zone data is large).
- NOTIFY — the primary tells secondaries "the zone changed" immediately, so they don't wait for REFRESH.
Flow: edit zone on primary → bump serial → primary sends NOTIFY → secondary queries SOA, sees a higher serial → requests IXFR/AXFR → serves the new data.
Securing transfers
An open AXFR lets anyone download your whole zone — a map of internal hostnames for an attacker. Restrict transfers:
allow-transfer { 192.0.2.53; 198.51.100.53; };(BIND) — only your secondaries' IPs.- TSIG — shared-secret signatures on transfer requests and responses.
dig AXFR example.com @ns1.example.com # should be REFUSED from random hosts
A hidden primary setup keeps the editable primary off the public NS list; only secondaries (often a managed provider) answer the internet.
Route 53 and multi-provider DNS
Route 53 doesn't support outbound AXFR (you can't make another provider a secondary via zone transfer) or act as a classic secondary. For multi-provider authoritative DNS (resilience against a provider-wide outage), teams:
- manage records as code (Terraform with two providers, octoDNS, DNSControl) and push identical data to both providers;
- list name servers from both providers at the registrar;
- keep TTLs and feature use compatible (Route 53-only features like alias records and routing policies don't translate — use CNAMEs/plain records for multi-provider names).