If you are getting the following message, this basically means that your cPanel server’s Hostname is not properly setup and the server is failing to look it up;
IMPORTANT: Do not ignore this email.
The hostname (hostname.server.com) resolves to . It should resolve to xx.xx.xx.xx. Please be sure to correct /etc/hosts as well as the ‘A’ entry in zone file for the domain.
Some are all of these problems can be caused by
/etc/resolv.conf being setup incorrectly. Please check this file if you
believe everything else is correct.
You may be able to automaticly correct this problem by using the
‘Add an A entry for your hostname’ under ‘Dns Functions’
in your Web Host Manager
Until you correct this, you will constantly be bombarded with messages, so it’s probably best if you resolve this. But how you ask? Simple.
The first thing you need to do is log into your cPanel server and make sure the Hostname is a FQDN. By default its likely some random computer name or hosting account number if you rent / lease from a webhost provider. To this check this scroll down the left hand Functions Menu until you find the heading ‘DNS Functions’. Click on ‘Add an A entry for your hostname’. WHM will try to analyze your hostname and then present you with a button to click that says Add the entry, go ahead and click on that. WHM should automatically try to add the relevant A record for your hostname to the DNS zone present on your system. Best practice is to make the Hostname a subdomain of your FQDN, so for example if I wanted to do this for Keithdmitchell.com, I would make my Hostname cpanel.keithdmitchell.com or something to that affect. Then I would add an “A” record to my DNS zone pointing back to the server with the same IP address.
Once you have done this, log into your server via SSH / Shell and run the following command;
“/scripts/ipcheck”
If the hostname change was either incorrect or did not address the issue, you will receive an email stating that the hostname is still resolving incorrectly. This usually corrects the issue, but in the event it does not, you will want to also make sure that your name servers are also correct. To check your name servers, you will need to check your “/etc/resolv.conf” file. Open this up in a text editor such as Nano, Pico or VI and make sure that they have entries in them. They should look like the following;
search myserver (this should be your domain name, also may not be present in your config)
nameserver 98.59.5.1
nameserver 56.51.96.1
If you aren’t sure what you name server’s IP’s are, ask your webhost / ISP. If you are running your own name servers, they would be what ever IP address you assigned them and they must be external accessible IP’s and not internal. If they look like this, then they are incorrect;
search myserver (this should be your domain name, also may not be present in your config)
nameserver 127.0.0.1
nameserver 192.168.0.1
If you still aren’t sure about your name servers, simply do a DNS lookup on your domain to find out what they are. I recommend using Http://www.network-tools.com.
Assuming you added a correct hostname and your name servers are correct, your issue will be resolved!
Tags:
Cpanel,
hostname,
resolves