Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use BIND as my DNS server at home. For my SOA record (start of authority) I always use a serial in the recommended format


where ## is the counter for changes on that day.

Unfortunately I changed the serial and added 1 more digit by mistake. After updating the name-deamon, I couldn't revert this anymore.

Is there a possible way to reset the serial / counter inside BIND's internal libraries?

share|improve this question
I found a solution on serverfault.com/questions/158021/… – Master of Celebration Apr 19 '12 at 14:32
up vote 5 down vote accepted

"BIND's internal libraries" don't care what the serial number is. It's only agreement between the master server and slave servers that matters. In other words, BIND will happily let you decrease the serial number in a zone file without complaint.. It's just that the slaves would no longer receive updates.

Zone file serial numbers are unsigned 32-bit integers and they wrap around the largest possible 32-bit unsigned integer. So there is a way to decrease the serial number by incrementing it repeatedly until it rolls over and becomes closer to zero. There is a maximum amount by which you can increment it at a time, so you have to do this iteratively in multiple steps:

  • Increase the serial number by a large increment but no more than 2147483647
  • Wait for all of the slave servers to catch up and be up to date with the current SOA.
  • Repeat

You can always pick an increment such that you don't need to iterate more than twice.

Follow this HOWTO.

share|improve this answer

That solution you found is unnecessary (old info).

To be able to decrement a serial number on slave servers, you can log into the slave server and run rndc retransfer my.zone.name. This will cause the slave to fetch the zone from the master and completely ignore the serial number.

share|improve this answer
Yeah, well, that's assuming you have access to every one of the slave servers or else you want to ask the administrator of each one to run that command for you. – Celada Apr 26 '12 at 17:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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