Hostname not resolving to IP WHM/cPanel

Keelan picture Keelan · Nov 16, 2013 · Viewed 10.7k times · Source

I moved my WHM/cPanel installation to a new server. After changing the nameserver IP's and then after a little while the domains to started pointing to the new server.

However the hostname doesn't resolve to an IP address.

/scripts/ipcheck --verbose


IMPORTANT: Do not ignore this email.

Your hostname (xxx.example.com) could not be resolved to an
IP address. This means that /etc/hosts is not set up correctly,
and/or there is no dns entry for xxx.example.com. Please be
sure that the contents of /etc/hosts are configured correctly, and
also that there is a correct 'A' entry for the domain in the zone
file.

Some or all of these problems can be caused by /etc/resolv.conf
being setup incorrectly. Please check that file if you believe
everything else is correct.

You may be able to automatically correct this problem by using the
'Add an A entry for your hostname' option under 'Dns Functions' in
your Web Host Manager.

I ran:

nano /etc/hosts


# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
XXX.XXX.XXX.XXX         xxx.example.com xxx

I also check:

nano /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

Also:

nano /etc/nameserverips

XXX.XXX.XXX.XXX=ns1.example.com
XXX.XXX.XXX.XXX=ns2.example.com

I checked the "Add an A Entry for your hostname" in WHM:

Hostname | Server Main IP
xxx.example.com | XXX.XXX.XXX.XXX

I checked and rebuilt dnsconfig

/scripts/rebuildingdnsconfig

I am really not sure what else to check, i have rebooted the server. The domains pointing to the name servers work fine. THe problem i am having is i route all cpanel access and SSL configs for the emails through https://xxx.example.com because this has the SSL cert. I have compared the settings to the older server and they are the same except the IP address.

Centos 6.4 WHM 11.40.0 Build 19

  • XXX.XXX.XXX = Server IPs
  • xxx.example.com = hostname

Any help would be appreciated.

Answer

Keelan picture Keelan · Mar 27, 2016

Solved this:

Go to WHM, "add an entry for your hostname" and just submit again.

Even though it was correct submitting it again worked. This fix came from cPanel support.