How to troubleshoot named failed to restart DirectAdmin

Normally when named doesn’t want to start, this is due to a zone file being referenced in /etc/named.conf which is not contained in the /var/named/ folder.

To troubleshoot why named won’t start you can run the following:

named-checkconf -z /etc/named.conf | grep "error"

This will output the problematic zone, and to solve the issue simple remove the line in /etc/named.conf which is referencing the non-existent zone file in the /var/named folder.

You can then restart named with the following command:

systemctl restart named