DNS file corrupted and cPanel cannot reset DNS zone
- by Seth Carstens
- March 9, 2012
We had a problem this week with a cPanel server migration. Thought we would share what we learned since I didn’t see any websites or forums with answers to my questions.
First thing you should know is the cPanel stores the DNS into seperate files on the server. More or less one or more files per domain (usually just 1 file). You find these files in “/var/named” on the server. If you run into the problem we did where your files were corrupted, the only way to fix the issue is to delete or rename the file associated with the domain you are working on.
For example, if the domain itsmyparty.com was having DNS issues, and cPanel would’t let you edit the DNS zone because there were errors in it, and maybe you can’t even reset the zone because it also throws an error then you would
- SSH into the server (or SFTP as root)
- navigate to /var/named
- find the file itsmyparty.com.db and rename it to itsmyparty.com.db.bak.
- Log into your servers WHM admin area
- Find the “Reset DNS zone” page
- Reset the DNS for itsmyparty.com
Now your DNS should be back to normal (matching the DNS template file) and the website should load normally, hurray! You now need to manually recreate all the DNS records for that domain, hope you had stored them somewhere…
You must be logged in to post a comment.