Secondary DNS servers provide redundancy and geographic distribution for your DNS zones.
Secondary DNS servers (also called slave servers) maintain copies of your DNS zones synchronized from the primary (master) server. This redundancy is fundamental to DNS reliability: if your primary nameserver becomes unavailable, secondaries continue serving your domain without interruption.
Beyond simple redundancy, secondary DNS enables geographic distribution (servers closer to users), DDoS resilience (attack one provider, others survive), and load distribution (queries spread across multiple nameservers). Many organizations use multiple DNS providers as secondaries for ultimate resilience.
Zone transfers (AXFR for full, IXFR for incremental) keep secondaries synchronized with the primary. Understanding these protocols, their security implications, and monitoring requirements is essential for robust DNS infrastructure.
Understanding the primary-secondary relationship:
Secondary DNS is critical for reliability:
Setting up secondary DNS servers:
BIND and zone transfer commands:
# Primary (BIND named.conf) - Allow transfers to secondaries
zone "example.com" {
type master;
file "/var/named/example.com.zone";
allow-transfer { 198.51.100.10; 198.51.100.20; };
also-notify { 198.51.100.10; 198.51.100.20; };
};
# Secondary (BIND named.conf) - Slave from primary
zone "example.com" {
type slave;
file "/var/named/slave/example.com.zone";
masters { 203.0.113.53; };
};
# Zone file NS records (on primary)
example.com. IN NS ns1.example.com.
example.com. IN NS ns2.example.com.
example.com. IN NS ns3.example.com.
ns1.example.com. IN A 203.0.113.53 ; Primary
ns2.example.com. IN A 198.51.100.10 ; Secondary 1
ns3.example.com. IN A 198.51.100.20 ; Secondary 2
# Test zone transfer manually
$ dig AXFR example.com @ns1.example.com
# Check SOA serial across all nameservers
$ for ns in ns1 ns2 ns3; do
echo -n "$ns: "
dig +short SOA example.com @$ns.example.com | awk '{print $3}'
done
# TSIG key for secure transfers (generate with dnssec-keygen)
key "transfer-key" {
algorithm hmac-sha256;
secret "base64-encoded-secret==";
};
Secure zone transfers with TSIG (Transaction Signature) to prevent unauthorized servers from obtaining your zone data. Always restrict allow-transfer to known secondary IPs.
Build robust secondary DNS infrastructure:
Minimum two nameservers required (RFC 1034). For critical domains, 3-5 across multiple providers and regions is recommended.
No, secondaries are read-only. All changes must be made on the primary. Secondaries overwrite local data on each transfer.
You can't update. Options: promote a secondary to primary, use hidden primary architecture, or use managed DNS with automatic failover.
The actual primary is internal/not in NS records. All public nameservers are "secondaries" that sync from the hidden primary. Better security.
With NOTIFY enabled, nearly instant (seconds). Without NOTIFY, secondaries wait for SOA refresh interval (potentially hours).
Yes, MoniTao can monitor SOA serial consistency across all your nameservers and alert you if secondaries fall out of sync.
Secondary DNS is not optional for production domains. Without redundant nameservers, a single server failure takes your entire domain offline. The investment in secondary DNS pays for itself the first time your primary experiences issues.
Configure multiple secondaries across different providers and regions. Secure zone transfers with TSIG, monitor serial consistency with MoniTao, and test failover regularly. Robust DNS infrastructure is the foundation of reliable services.
Start free, no credit card required.