Command named-checkconf checks the syntax only of a named ( bind ) configuration file. The file is parsed and checked for syntax errors, along with all files included by it. If there is no file is specified with the command, /etc/named.conf is read by default.
1. Check DNS (Bind) Configuration
In case of any changes done in bind configuration, I recommend checking the DNS configuration file before restarting service.
If the bind is running in chroot environment use below command also along with above command
named-checkconf -t /var/named/chroot /etc/named.conf
Above command will show nothing if there is no error found in the configuration file. In case of any error will displayed as output.
2. Check Bind Zone File
To check the syntax of zone file use command as below. It will show the result in both cases.
named-checkzone demotecadmin.net /var/named/demotecadmin.net.db
zone demotecadmin.net/IN: loaded serial 3013040200 OK
3. Check Configuration file in Older version of Bind
If you are using an older version of the bind, you can have also checked the configuration using below command.
service named configtest
zone tool.com/IN: loaded serial 42 zone localhost/IN: loaded serial 42 zone 1.168.192.in-addr.arpa/IN: loaded serial 1997022700 zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1997022700 zone 255.in-addr.arpa/IN: loaded serial 42 zone 0.in-addr.arpa/IN: loaded serial 42