So a DNS zone file contains an SOA record specifying the authoritative name server, along with some other information such as a "serial number".

I'm trying to understand the purpose of the serial number. Googling around for answers, I found the following explanation:

Serial numbers in DNS zone files provide a way for the server to verify that the contents of a particular zone file are up-to-date. If the serial number in a zone file hasn't changed since that zone was last loaded, named figures that it can ignore the file. This means that sysadmins have to remember to update the serial number every time they make a change to a zone file -- otherwise, their changes won't be picked up and published.

Source: http://www.itworld.com/article/2767441/it-management/serial-numbers-in-zone-files--yours-and-named-s.html

I don't understand this explanation, and the fact that this requires sysadmins to remember to manually update the serial number seems insane.

So, what's the purpose of the serial number? It can't be for other DNS servers to verify if a particular record is out-of-date, because that's what the TTL is for.

So, why is it important to have a serial-number? Why not just have the DNS server re-read the zone file when a change is made?


It's so that other servers doing zone transfers can verify if they need to do a zone transfer. Old serial number, no transfer. TTL not involved on this one.

The DNS server knows that it needs to re-read the zone file when the serial number changes as just making a change does not trigger anything, there's no timestamp within the zone file generated by changing anything to note that there has been an update on most DNS software. Most Zone files are just text files in the *nix world.

Normal convention is that the Serial number is the timestamp in date ISO date format followed by a two number increment


Microsoft products are set up to autoincrement the Serial Number when changes are made.

  • 1
    Any reasonable zonefile editor will increase the serial number automagically. Also, the serial number is a useful debugging tool for the DNS admin, by comparing the number retrieved from a resolver with the number in the zonefile, the admin can rule out (or find) DNS caching as source of a problem. The zone file format depends on the DNS server though: PowerDNS e.g. natively uses SQL-based databases, while the dominant text-file format you are probably referring to is the BIND format. – Jonas Schäfer Oct 15 '14 at 14:38
  • 1
    @JonasWielicki I've seen three types in the wild; the YYYYMMDDNN format mentioned (ISO 8601 date plus two-digit sequential integer will "always" fit within 32 bits, for any reasonable definition of "always", for reasonable definitions of "reasonable", ...), a simple sequential integer, and what looks suspiciously like Unix 1970-epoch timestamps. The only real requirement is that when encoded as a 32-bit integer, the SOA RR serial number field must be incremented when you want slave servers to initiate a zone transfer following either refresh SOA queries or NOTIFY messages from the master. – a CVn Oct 15 '14 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.