cPanel rebuild all DNS zones


I recently had my datacenter set up a new cPanel/Fantastico server for our hosting platform. Unfortunately they spelled the site name incorrectly which caused a load of problems. You can change the hostname with relative ease from within the basic setup section, however once the wrong nameservers are specified and domains are generated you’re stuck.

After fixing the nameserver addresses, you’d think that ‘/scripts/rebuildnsdzones’ or ‘/scripts/rebuildnamedconf’ would be obvious candidates however no such luck.

The answer came in the form of a 3rd party script. Back up your /var/named directory, and then download/run this perl script:


I am a g33k, Linux blogger, developer, student and Tech Writer for My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.