Check the DNS First
This advanced guide is designed to teach how to check a domain’s DNS configuration using leafdns.com for the examples, and how to resolve common DNS errors either at the registrar, or in cPanel/WHM. This article will go over a correctly configured domain name, then address common errors and their symptoms.
Correctly Configured DNS
Here you can see 5 categories of test boxes. Here is a breakdown of the information you are seeing:
Parent NS Tests
These DNS records are set at the registrar (where the domain is registered at (e.g. LaunchPad, Domain.com, Enom). In the example below, the private name servers are registered and set properly. The private name servers are registered correctly because the IPs appear in the IP column, and the Glue column has the two green checks.
Local NS Tests
The records shown in the Local NS Test box are managed within WHM. In the example below, the DNS Glue is set perfectly. This means that the private name servers have been configured correctly at both the registrar and within WHM.
At the registrar, they have been registered and updated. In WHM, the SOA, two NS records, and two NS A records are set.
Below is an image of the WHM DNS Zone file with the correct records for private name servers: the SOA, the two NS records, and the A records for the two NS records (the glue):
For step by step instructions for how configure these records from WHM, please reference the following articles:
The SOA record stands for the Start of Authority and points to the server where DNS changes need to be made. If the SOA record on the server the domain's name servers point to references a different server, that server is where your DNS must be changed. SOA records generally should be set to the same domain as the first of your two name servers.
These DNS records are also set within HG’s servers in WHM. It is common for the SOA test to provide warnings for your Refresh and Default TTL. These values indicate how frequently DNS servers check for updates to your domain, this can be safely ignored if you do not regularly change your DNS.
The screenshot below is what the SOA records look like in the WHM DNS zone for our example domain:
MX records manage where the domain’s email is hosted. These DNS records can be managed in your cPanel if you're using HostGator name servers, or within WHM. If managed in cPanel, you’ll use the MX Entry icon in the Email section. This is the first thing you should check if a customer is claiming not ot receive email at their HostGator email.
Here is an example of correctly configured MX records for a HostGator reseller server :
Sometimes MX records will return an error for correctly configured MX records, since the shared mail will go out through a gateway. The rDNS on the gateway may not accurately reflect the domain sending the mail. If the IP address for your MX record matches that from inside of your cPanel, or correctly configured A record for your domain, you may safely disregard this error.
Here is an example of correctly configured MX records generating an error:
This is the MX record for sugar-duck.com. Since the MX record is pointed to sugar-duck.com, it will correctly route email to the same server as where the website is hosted, despite the error indicated by LeafDNS.
If you're using HostGator name servers, these DNS records can be managed in your HG cPanel using the Advanced DNS zone editor, or within WHM. The normal basic configuration will involve an A record for your domain and a CNAME for your www subdomain.The A record for your domain should be pointed to the IP address for your cPanel. This will be available in the Server Information section of the left hand sidebar from your cPanel home page. The www subdomain should be a CNAME pointed to your domain name:
Common Errors and How to Resolve Them
In this section you'll learn how to address common errors for each type of issue:
Parent Name Server Errors
Here are some of the most common errors you may experience with your name servers:
- Private Name Servers are not registered with the proper IPs:
The following screenshot is another error you’ll encounter. Notice how there aren’t any IPs in the IP column and there are no green checks under the glue column? This means that you haven't registered the IPs for the private name servers at your registrar. You will need to follow the steps in this guide: Private Name Servers - Setup.
- Your domain is using the wrong IPs, or you haven't added the domain to your server yet:
The screenshot below demonstrates the third most common Parent NS Test error you’ll see. This occurs when you're using the wrong IPs for the private name servers, or the domain isn’t added onto the server yet. First check to see if the domain is using the correct IPs. If not, you'll need to update your IPs to the ones from your welcome email. If you are using the correct IPs, ensure the domain is added to the server’s DNS zone. Either add it as an addon, or create an account in WHM.
Local NS, SOA, and Glue Errors
Here are some of the most common errors and warnings you will experience if there are errors in the DNS zone file:
- If there is a warning message that the local name servers are mismatched, this will indicate that the local name servers in the DNS zone of the server the domain's name servers are pointed to do not match the ones at the registrar, or may have the IP addresses reversed.
Note: If the name servers at the registrar are correct and pointed to a HostGator server, this can easily be resolved by editing the domain's DNS zone to match the parent name servers. Particularly the A records for the name server subdomains, or the NS record names. Don't forget the terminating period at the end of the NS record names.
Here is an example of correctly configured local name servers, SOA record, and A records:
Please refer to our article on configuring Private Name servers:
- If the domain does not have a zone file on the host server, it may appear as an error with its parent name servers, however this will indicate that the entire DNS on the server may need to be set up or reviewed for errors:
The first thing to check for when you see this is to ensure that the domain is added to the server at all. If it is not, attempt to add the domain as an addon domain or create a new acccount for the domain if it is on a Reseller, VPS, or Dedicated server.
If your domain is on a shared server, your may be using the wrong name servers for the server your hosting package is purchased on.
The most obvious error with MX records will be if the domain does not have an MX record set:
To correct this error:
- Log in to cPanel as the user.
- Click the icon labeled MX Entry.
- In the section labeled Add a New Record enter a domain pointed to the IP of the server the customer wishes to receive mail at, set the priority to 0, and click Add New Record:
The more common issue with MX records that will prevent mail from being delivered will not generate an error in a DNS test. If the MX record is pointed to the wrong IP address your mail will be directed to an incorrect server.
To assist with correcting this issue, please follow our guide on using MX records:
Similar to MX records, the most common WWW errors are related to the records pointed to the wrong place. This will unfortunately not display an error when doing a DNS check, and you will have to manually check to see that your IP is correct.
There should be an A record for your domain name, and a CNAME for your WWW subdomain that points to your domain name. This way, both your domain and WWW subdomain resolve to the same IP address. Make sure that your IP address points to the IP address that shows in the server information inside of your cPanel:
Like many servers, HostGator servers have multiple IP addresses and each cPanel may only have one. For your domain to resolve to your site, it must be pointed to the IP of your cPanel rather than the server IP in your welcome email.
Also, ensure that there are no extra records. Some advanced configurations allow users to use multiple A records, and so it is possible to create a zone file with a domain pointed to multiple IP addresses. However, this is only for advanced use and is not covered by this article. Remove any duplicate records for your domain if you have not configured this deliberately.