Astart of authority record (abbreviated asSOA record) is a type ofresource record in theDomain Name System (DNS) containing administrative information about the zone, especially regardingzone transfers. The SOA record format is specified in RFC 1035.[1]
Normally DNS name servers are set up in clusters. The database within each cluster is synchronized through zone transfers. The SOA record for a zone contains data to control the zone transfer. This is the serial number and different timespans.
It also contains theemail address of the responsible person for this zone, as well as the name of the primary master name server. Usually the SOA record is located at the top of the zone. A zone without a SOA record does not conform to the standard required by RFC1035.
Email address of the administrator responsible for this zone. (As usual, the email address is encoded as a name. The part of the email address before the@ becomes the first label of the name; the domain name after the@ becomes the rest of the name. In zone-file format, dots in labels are escaped with backslashes; thus the email addressjohn.doe@example.com would be represented in a zone file asjohn\.doe.example.com.)
SERIAL
Serial number for this zone. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate azone transfer.
REFRESH
Number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes. Recommendation for small and stable zones:[4]86400 seconds (24 hours).
RETRY
Number of seconds after which secondary name servers should retry to request the serial number from the master if the master does not respond. It must be less thanRefresh. Recommendation for small and stable zones:[4]7200 seconds (2 hours).
EXPIRE
Number of seconds after which secondary name servers should stop answering requests for this zone if the master does not respond. This value must be bigger than the sum ofRefresh andRetry. Recommendation for small and stable zones:[4]3600000 seconds (1000 hours).
MINIMUM
Used in calculating thetime to live for purposes ofnegative caching. Authoritative name servers take the smaller of the SOA TTL and the SOA MINIMUM to send as the SOA TTL in negative responses. Resolvers use the resulting SOA TTL to understand for how long they are allowed to cache a negative response. Recommendation for small and stable zones:[4]172800 seconds (2 days). Originally this field had the meaning of aminimum TTL value for resource records in this zone; it was changed to its current meaning by RFC 2308.[5]
Several methods have been established for updates to the SERIAL field of a zone's SOA record:
The serial number begins at 1, and is simply incremented at every change.
The serial number contains the date of the last change (inISO 8601 basic format) followed by a two-digit counter. For example, the fifth change made on 14 March 2017 (2017-03-14 inISO 8601) would have the serial number 2017031404. This method is recommended in RFC 1912.[6]
The serial number is the time of last modification to the zone's data file expressed as the number of seconds since theUNIX epoch. This method is used by default in thedjbdns suite.[7] Although it uses a 32-bit counter, it is not susceptible to theyear 2038 problem due to the effect ofserial number arithmetic.