SOA record: what it is and how to check it
The administrative header of a zone: primary server, contact, serial number and timers.
What it is
The SOA record (start of authority) is the header of every DNS zone. It sits at the zone apex, there is exactly one per zone, and it describes how the zone is managed: which server holds the master copy, who to contact, which version of the zone is current, and how secondary servers and resolvers should time their work.
The SOA record is defined in RFC 1035. The meaning of its last field was redefined by RFC 2308, and recommended values are discussed in RIPE-203, a widely cited operational guide.
How it works
Many DNS setups have one primary server, where changes are made, and several secondary servers that copy the zone. The SOA record coordinates them:
- A secondary checks the primary’s SOA serial every refresh seconds. If the serial is higher than its own copy, it downloads the zone (a zone transfer).
- If the primary cannot be reached, the secondary tries again every retry seconds.
- If it still cannot reach the primary after expire seconds, it stops answering for the zone rather than serve stale data.
- Primaries can also send a NOTIFY message (RFC 1996) so secondaries update immediately instead of waiting.
The SOA also matters to everyone else. When a name does not exist, the authoritative server includes the SOA record in the authority section of its NXDOMAIN answer, and resolvers use it to decide how long to remember that negative answer.
Many large DNS providers do not use classic zone transfers internally, so on those platforms the refresh, retry and expire values have little practical effect. The serial and minimum fields still matter.
Syntax and fields
| Field | Example | Meaning |
|---|---|---|
| MNAME | ns1.example.net. |
The primary nameserver for the zone. |
| RNAME | hostmaster.example.com. |
Administrator’s mailbox, with the first dot standing for @. |
| SERIAL | 2026102601 |
Version number of the zone. Must increase with every change. A common convention is YYYYMMDDnn. |
| REFRESH | 7200 |
Seconds between secondary checks of the serial. |
| RETRY | 3600 |
Seconds between retries after a failed check. |
| EXPIRE | 1209600 |
Seconds after which a secondary that cannot reach the primary stops answering. |
| MINIMUM | 3600 |
Upper bound for caching negative answers (RFC 2308). |
The serial uses sequence-space arithmetic (RFC 1982), so it can wrap around, but in practice you should only ever increase it.
Typical values
| Field | Common range | Notes |
|---|---|---|
| REFRESH | 3600 to 86400 | Shorter when NOTIFY is not used. |
| RETRY | 600 to 7200 | Should be shorter than REFRESH. |
| EXPIRE | 1209600 to 2419200 | Two to four weeks, so secondaries survive a long primary outage. |
| MINIMUM | 300 to 3600 | Higher values hide newly created names for longer. |
These are guidelines, not rules. If your DNS provider does not let you change them, its defaults are almost always reasonable.
Examples
A typical SOA record:
example.com. 3600 IN SOA ns1.example.net. hostmaster.example.com. (
2026102601 ; serial
7200 ; refresh (2 hours)
3600 ; retry (1 hour)
1209600 ; expire (14 days)
3600 ) ; minimum / negative TTL (1 hour)
The same record as a lookup tool prints it on one line:
example.com. 3600 IN SOA ns1.example.net. hostmaster.example.com. 2026102601 7200 3600 1209600 3600
An NXDOMAIN answer carries the SOA in the authority section:
;; status: NXDOMAIN
;; AUTHORITY SECTION:
example.com. 3600 IN SOA ns1.example.net. hostmaster.example.com. 2026102601 7200 3600 1209600 3600
Common mistakes
- Forgetting to increase the serial. On self-managed primaries, editing the zone without raising the serial means secondaries never pick up the change. Different servers then return different answers.
- Writing the email with @.
hostmaster@example.comis invalid in RNAME; usehostmaster.example.com.. - A very large minimum value. Resolvers may cache “this name does not exist” for that long. If you create a record shortly after someone looked it up, they may not see it until the negative cache expires. Values between 300 and 3600 seconds are common.
- Expire shorter than refresh. A secondary could then stop answering before it has even tried to refresh. Expire should be much larger than refresh plus retry; one to four weeks is usual.
- Serial jumping backwards. If you switch serial formats, for example from a Unix timestamp to a date, the new number may be lower than the old one. Secondaries will then ignore every update until the serial catches up.
How to check it
Use the DNS lookup tool with type SOA to see the record with all its fields. To check that every authoritative nameserver has the same version of the zone, run the DNS propagation checker with type SOA: it queries each authoritative nameserver directly, and differing serials point to a secondary that is out of date.
Related records
- NS: lists all the authoritative nameservers; MNAME names the primary among them.
- DS and DNSKEY: DNSSEC records that also live at the zone apex.
- A: a newly created A record can be hidden by a cached negative answer, whose lifetime the SOA controls.
Frequently asked questions
Do I need to create an SOA record myself?
Almost never. Every zone has exactly one SOA record at its apex, and DNS providers create and maintain it automatically. You may be able to change some timers, but the serial is usually managed for you.
What is the email address in the SOA record?
The RNAME field holds the zone administrator's mailbox with the @ replaced by a dot, so hostmaster.example.com. means hostmaster@example.com. A dot inside the local part is escaped with a backslash.
What does the last SOA number control?
Today it sets how long resolvers may cache a negative answer, such as 'this name does not exist' (RFC 2308). The actual negative-cache time is the smaller of this value and the TTL of the SOA record itself.
Why do my nameservers show different SOA serials?
A secondary server has not yet copied the latest version of the zone. This is normal for a short time after a change. If it persists beyond the refresh interval, zone transfers between the primary and that secondary are failing.