What is a DNS SOA record?
DNS SOA Record (Start of Authority) is an authoritative record on the DNS server that contains important information about the DNS zone.
It provides information about:
- Primary Server Name: The primary DNS server responsible for the zone.
- Secondary Server Name: A backup DNS server that can be used if the primary server is unavailable.
- Serial Number: A number that indicates the current version of the zone.
- Expiration Time: The time duration during which the zone will be cached by the resolver.
- Refresh Time: The duration of time during which the secondary server will check the primary server for updates.
- Retry Time: The time duration in which the secondary server will retry if the primary server does not respond.
- Maximum Expiration Time: The maximum time duration in which the zone will be kept in cache by the resolver.
Purpose of DNS SOA Record:
- Provides authoritative information about DNS zones.
- Helps prevent DNS lookup loops.
- Ensures that DNS clients get the latest information about zones.
- Helps manage zone replication between primary and secondary DNS servers.
Format of DNS SOA Record:
<zone name> SOA <primary server name> <secondary server name> <serial number> <expiration time> <refresh time> <retry time> <maximum expiration time>
Example DNS SOA Record:
example.com. SOA ns1.example.com. ns2.example.com. 2023030801 3600 1800 604800 86400
In this example:
example.com.is the zone name.ns1.example.com. is the primary server.ns2.example.com. is the secondary server.2023030801is the serial number.3600is the expiration time (1 hour).1800is the refresh time (30 minutes).604800is the retry time (7 days).86400is the maximum expiration time (1 day).master.example.com. (2023030800; Serial Number 86400; Refresh 7200; Retry 3600000; Expire 86400; Negative TTL)