How to Check DNS ( BIND ) Configuration File

In case of any changes in bind configuration, recommended to check DNS configuration file before restarting service.

named-checkconf /etc/named.conf

You can use below command , in case of chroot environment:

named-checkconf -t /var/named/chroot /etc/named.conf

Above command will not show any output if there are no error found in configuration file. In case of any errors will displayed as output.

To check the syntax of zone file use command as below, It will show result in both cases:

named-checkzone cpanelplesk.com /var/named/cpanelplesk.com.db

If you are using older version of bind, you can check the configuration using below command:

service named configtest