When querying against the authoritative name servers (IPs) for a given domain (domain.tld) you are presented with this error in the name server's error log: (Here the localhost (127.0.0.1) is the address of the name server, but it could be any IP )
dig @127.0.0.1 domain.tld +short; tail -f /var/log/named/named.log
07-Oct-2020 13:57:44.864 general: error: zone domain.tld/IN/external: has no NS records
07-Oct-2020 13:57:44.864 general: error: zone domain.tld/IN/external: not loaded due to errors.
07-Oct-2020 14:06:04.994 general: error: zone domain.tld/IN/external: has no NS records
07-Oct-2020 14:06:04.994 general: error: zone domain.tld/IN/external: not loaded due to errors.
07-Oct-2020 14:06:05.025 general: error: zone domain.tld/IN/internal: has no NS records
07-Oct-2020 14:06:05.025 general: error: zone domain.tld/IN/internal: not loaded due to errors.
07-Oct-2020 14:10:40.607 general: error: zone domain.tld/IN/external: has no NS records
07-Oct-2020 14:10:40.607 general: error: zone domain.tld/IN/external: not loaded due to errors.
07-Oct-2020 14:10:40.637 general: error: zone domain.tld/IN/internal: has no NS records
07-Oct-2020 14:10:40.637 general: error: zone domain.tld/IN/internal: not loaded due to errors.
This means that the domain's zone file is missing the required NS records for the domain. You can confirm that by running this command against the zone file of the domain: (Replace domain.tld with your domain)
/usr/sbin/named-checkzone domain.tld /var/named/domain.tld.db
zone domain.tld/IN: has no NS records
zone domain.tld/IN: not loaded due to errors.
Workaround:
You need to update the zone file with the proper NS records. This can be done from either the graphical user interface (the WHM/cPanel interface ) or from the command line. For WHM/cPanel you can visit these sections:
WHM:
Home » DNS Functions » DNS Zone Manager
cPanel:
Home » Domains » Zone Editor
And to update the zone file from the command line, you can follow these steps:
- Open the zone file with your editor of choice (location of the zone file is here /var/named/domain.tld.db)
- Add the NS records with proper syntax and values
- Increment the serial number at the top of the zone file by one
- Write and exit
- Reload the config file using the rndc command like this:
rndc reload
- Then check the main log errors in /var/log/messages to see if you can detect any new configuration errors
- Finally, test the new NS records using this command: (Replace domain.tld with your domain)
dig @127.0.0.1 domain.tld +short
Comments
0 comments
Article is closed for comments.