Skip to main content

SOA record explained: serial and negative TTL

Dennis Postma22 October 2026
Reading time4 minutes
DNS basics

The SOA record sits at the top of every DNS zone. What its seven fields mean, how serial numbers work and why the last one sets negative caching.

DNSense guide cover: an SOA record for example.com with serial 2026102201 and refresh 7200

Every DNS zone starts with one SOA record, the Start of Authority. It names the zone's primary server, gives a contact and carries the timers that nameservers use to stay in sync. You rarely edit it, but it explains a few odd behaviours.

The seven fields

Look at one with dig:

dig SOA example.com +short
ns1.example.net. hostmaster.example.com. 2026102201 7200 3600 1209600 3600
FieldExampleMeaning
MNAMEns1.example.net.The primary nameserver for the zone
RNAMEhostmaster.example.com.The contact address, written with a dot instead of @
Serial2026102201Version number of the zone
Refresh7200How often a secondary server checks for a new version, in seconds
Retry3600How long a secondary waits before trying again after a failed check
Expire1209600How long a secondary keeps answering if it cannot reach the primary
Minimum3600How long resolvers cache a "this name does not exist" answer

The serial number

A secondary nameserver compares its serial with the primary's. If the primary's is higher, it downloads the zone. If you change records without raising the serial, secondaries keep serving the old data.

Many hosts use the date plus a counter, YYYYMMDDnn, so 2026102201 is the first change on 22 October 2026. Others use a plain counter or a Unix timestamp. Any scheme works as long as the number only goes up.

Managed DNS providers raise the serial for you on every change. Only if you run your own zone files do you have to do it by hand.

The last field matters most

The final field is the negative caching time. When a resolver asks for a name that does not exist, it remembers that answer for the lower of this value and the SOA record's own TTL.

This causes a classic surprise. You query a new hostname before you create it, get "not found", then add the record. Your resolver keeps saying "not found" until the negative answer expires. Create records first, then test, and keep this value modest, an hour or less, if you add names often.

Lookup of new.example.com at 10:00 returns not found, the record is added at 10:05, and the resolver keeps saying not found until 11:00

Refresh, retry and expire

These only matter when you run secondary nameservers that copy the zone from a primary. Providers that serve your zone from their own platform ignore them. If you do run secondaries, a common set is refresh at a few hours, retry at an hour and expire at two weeks. Expire must be well above refresh, or a short outage turns into an outage of the whole zone.

SOA records and DNSense

The SOA record belongs to your DNS host. It is created with the zone and updated automatically, and DNSense does not manage it, in the same way it leaves apex NS records alone. You work with the records inside the zone, and the host takes care of the serial.