Fix Corrupted named.conf in cPanel

Sometimes named.conf gets corrupted on cPanel server.

Here is the way to fix that in cPanel servers.

First, move the corrupted named.conf using the following command

root@cpanelserver[~]# mv /etc/named.conf /etc/named.conf.bak

Now, execute the following cPanel script to rebuild the named.conf

root@cpanelserver[~]# /usr/local/cpanel/scripts/rebuilddnsconfig

And restart the named service:

root@cpanelserver[~]#/etc/init.d/named restart

Server's named.conf is now rebuilt and operating as normal.

Was this answer helpful?

 Print this Article

Also Read

How to Create a Subdomain in cPanel

A subdomain is a subsection of your website that exists as a subdirectory in your public_html...

How to Flush DNS Cache

Flushing your DNS cache can be useful when the information about a domain you hold is outdated,...

Removing cPanel Accounts with /scripts/removeacct Script

The /usr/local/cpanel/scripts/removeacct script terminates cPanel accounts from the command line....

How to Flush DNS Cache in Windows 10

Flushing the DNS resolver cache can help resolve DNS related problems in Microsoft Windows 10....

Using .htaccess File to Block IPs

You may block access to your website from specific IP addresses using .htaccess file. You need to...