DEV Community

TechFixDocs
TechFixDocs

Posted on • Originally published at techfixdocs.my.id

How to Fix: Error in named-checkzone: DNS zone error: has no address records (A or AAAA)

Error in named-checkzone: DNS zone error: has no address records (A or AAAA) - fix for BIND configuration.

The Problem

The error 'named-checkzone: DNS zone error: has no address records (A or AAAA)' occurs when the BIND configuration for a specific DNS zone does not include any A or AAAA record entries. This issue affects users who are configuring their private DNS servers, as it prevents them from resolving domain names to IP addresses. The frustration of encountering this error is compounded by the fact that it can be challenging to identify and resolve, especially for those without extensive DNS configuration experience.Fortunately, this error can be easily resolved by identifying and correcting the missing A or AAAA record entries in the BIND configuration file.
🛑 Root Causes of the Error

                The primary reason for this error is that the DNS zone specified in the 'named-checkzone' command does not have any A or AAAA record entries. This can occur when the DNS server is not properly configured or if there are missing records in the zone file. An alternative cause could be a typo or incorrect formatting in the zone file, which would prevent BIND from parsing the configuration correctly.In some cases, the issue may also arise from the fact that the DNS server is not configured to use the correct IP addresses for the domain names. For example, if the 'A' records are missing, the DNS server will not be able to resolve the domain name to an IP address.

            ✅ Best Solutions to Fix It

                Correcting Missing A or AAAA Record Entries

                    Step 1: Open the BIND configuration file (usually named 'forward.xyz1.com') and locate the section containing the A or AAAA record entries. In this case, the relevant sections are the ones starting with 'dns1.xyz1.com.' and 'dns2.xyz1.com.'.Step 2: Verify that these sections exist in the zone file and that they contain valid IP addresses. If a section is missing, create a new one with the correct IP address for each domain name.Step 3: Save the changes to the BIND configuration file and restart the DNS server service (usually named 'named') to apply the changes.



                Verifying Correct Configuration

                    Step 1: Check the BIND configuration file again to ensure that all A or AAAA record entries are present and correctly formatted. Verify that the IP addresses are valid and that they match the expected IP range for the domain names.Step 2: Use a tool such as 'dig' or 'nslookup' to test the DNS server's resolution capabilities for specific domain names. This will help you verify that the BIND configuration is working correctly.


            ✨ Wrapping Up
            Once the error has been identified and corrected, the DNS server should be functioning properly. To confirm this, use a tool such as 'dig' or 'nslookup' to test the DNS server's resolution capabilities for specific domain names. If you encounter any further issues, consult the BIND documentation or seek assistance from a qualified IT professional.
Enter fullscreen mode Exit fullscreen mode

Full step-by-step guide with screenshots: Read the complete fix here

Found this helpful? Check out more verified tech fixes at TechFixDocs

Top comments (0)