“IMPORTANT: do not ignore this email: The hostname resolves to . It should resolve to X.X.X.X”

A newly setup cPanel system may have a message such as the following show the first time that you login to WHM.

 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

Here are the steps that you should work through to solve this issue.

1. Follow the instructions that cPanel has provided by checking to see if you can solve this issue using WHM provided tools. Login to your server’s WHM (not cPanel) by going to https://%5BYOUR SERVER IP]:2087 in your web browser.

2. You probably see the error now, go ahead and close it for now and 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.

3. Go ahead and logout and then log back in to WHM to see if the message returns. Look to the top of WHM to see the “Logout(root)” link. Optional Tip: If you don’t like logging into and then out of WHM while testing the fixes you can instead login to your server via SSH and whenever you are ready to test simply run the following command:

root@myserver [~]# /scripts/ipcheck

This command will send you an email immediately if your settings are still incorrect.

4. Hopefully that worked, but if not, we should go ahead and edit your /etc/hosts file just in case. Login to your system via SSH. Use your favorite text editor to make sure that your /etc/hosts file looks something like this.

root@myserver [~]# cat /etc/hosts
127.0.0.1              localhost
xx.xx.xx.xx            myserver.mydomain.com myserver

If you would like more information on the structure of the hosts file type ‘man hosts’ as the structure of this file is outside of the scope of this document.

5. Use your preferred method of checking for the message again. Has it returned? Are you sure that your server is using the proper resolvers? Make sure that your /etc/resolv.conf has the following within.

nameserver 10.0.80.11
nameserver 10.0.80.12

Though we understand that many users have custom configurations specified in /etc/resolv.conf, we would request that you temporarily change this information to the SoftLayer defaults while troubleshooting this issue. You can use the following commands.

cp /etc/resolv.conf /etc/resolv.conf.bak
echo -e ‘nameserver 10.0.80.11\nnameserver 10.0.80.12’ > /etc/resolv.conf

Let’s go ahead and test for the message again. Did it return? In this case it sounds like the domain name servers for your domain are not configured to be this server. Is it possible that they are configured to be another server? We can use dig from within the shell to try and find out. Try this:

dig +noall +answer +additional mydomain.com NS

Here are some example results:

$ dig +noall +answer +additional softlayer.com NS
softlayer.com.          86382   IN      NS      pdns6.ultradns.co.uk.
softlayer.com.          86382   IN      NS      pdns4.ultradns.org.
softlayer.com.          86382   IN      NS      pdns2.ultradns.net.
softlayer.com.          86382   IN      NS      pdns1.ultradns.net.
softlayer.com.          86382   IN      NS      pdns5.ultradns.info.
softlayer.com.          86382   IN      NS      pdns3.ultradns.org.
pdns2.ultradns.net.     86103   IN      A       204.74.109.1
pdns1.ultradns.net.     86103   IN      A       204.74.108.1
pdns1.ultradns.net.     86103   IN      AAAA    2001:502:f3ff::1
pdns6.ultradns.co.uk.   86275   IN      A       204.74.115.1
pdns5.ultradns.info.    82929   IN      A       204.74.114.1
pdns4.ultradns.org.     65318   IN      A       199.7.69.1
pdns4.ultradns.org.     65318   IN      AAAA    2001:502:4612::1
pdns3.ultradns.org.     65318   IN      A       199.7.68.1

In the most simple of setups, the IPs listed in your results (not SoftLayer’s) should match the IPs of your server. If they do, then everything should be working at this point. If not then you are using name servers that are not within your system and you will need to update them with the relevant A record.

6. If you are using SoftLayer’s name servers then login to our Portal and go to Public Network > dns and click to edit the domain in question. Simpy add an A record with your server’s main IP Address into the fields. If you are using some other name servers, you will need to contact the Administrator of that system to ask how you may add additional DNS Records.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s