Symptoms
When attempting to add or edit a DNS record for a given DNS zone, you encounter an error similar to one of the following.
Error: API failure: Zone is invalid: Line 64: ignoring out-of-zone data (domain.tld) at /usr/local/cpanel/Cpanel/ZoneFile/LineEdit.pm line 390
Error: The DNS zone file is invalid. (Line 167: ignoring out-of-zone data (_2396f77ac753300ee0714ba20aaf307d))
Description
This error occurs when cPanel attempts to validate the zone while there is an invalid DNS record in the zone, such as records for another domain, duplicate records, or a CNAME and other record for the same host. The error references the line with the issue.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Open the domain's DNS zone in your preferred text editor.
Please note that the zone files are stored in the /var/named folder. - Place a semi-colon ( ; ) at the beginning of the line in question to comment out the problematic DNS record.
- Increase the serial number line by 1.
- Confirm the DNS zone is valid by the following command.
named-checkzone domain.tld /var/named/domain.tld.db
- Reload the nameserver.
rndc reload
Comments
0 comments
Article is closed for comments.