Hi everyone,

I'm running a linux server (centos 6.4) with cpanel.
Cpanel sent me an email saying:

"IMPORTANT: Do not ignore this email.

Your hostname (hostnamegoeshere) could not be resolved to an IP
address..."

When I ping "hostnamegoeshere" it does work. It shows successfull pings of the IP address.
So, i'm at the point where I want to ignore that email, but I cant.

Please help.

Here is the complete warning email that I get:

IMPORTANT: Do not ignore this email.

Your hostname (hostnamegoeshere) 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 hostnamegoeshere. 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.

Could you post your /etc/hosts here (just xx out a piece of the IP).

Thanks for the reply. Here is the contents of the hosts file:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost localhost.localdomain localhost4 localhost4.localdomain4
::1             localhost localhost.localdomain localhost6 localhost6.localdomain6

#  localhost


xxx.xxx.xxx.xx          hostnamehere hostnamehere hostnamehere.dedicated.co.za

In line 9, you have a 'hostnamehere' name. Make sure that name is also added to line 3 for 127.0.0.1.

I didn't have any luck with that.
I ran /scripts/ipcheck again, which just emailed me the same warning.

Well your hosts file should be good after that.... did you check your DNS A record?

and also that there is a correct 'A' entry for the domain in the zone file.

In CPanel's WHM, there is an option to change my Hostname.
On that screen it states that a domain name must be a fully qualified domain name.

My current hostname is just one word (no fullstops).

Should that be changed to somethign like this: something.somthingelse.com,
or is it not critical to have a fully qualified domain name?

Can this be the cause of the warning email?

A fully qualified domain name (FQDN) does use the format of server.domain.com.

Whatever you enter here should have a cooresponding A record in your DNS nameserver's zone.

A fully qualified domain name (FQDN) does use the format of server.domain.com.

Actually, it would be 'server.domain.<root>' where '<root>' can be stuff like .com, .net, .org, .co.uk, .co.tv, etc.

FYI, .com and .co.nn are both for commercial sites. The .net and .org qualifiers are for network services and non-commercial organizations only. The example above for .co.tv is because .tv is assigned to the island nation of Tuvalu, which licenses ($$) its id for TV-related sites. :-)

Rubberman is correct in that your FQDN may not be a .com. Looks like you have a co.za as the root.

Hello,

The warning you are getting is telling you that the hostname of the server (which you said has no full stops) cannot be resolved to a IP address. You can fix this in one of two ways:

  1. The easy way. edit the /etc/hosts file and add the name you have given the server to the line starting with 127.0.0.1. For exsample if the name you have given the server is mycpanelserver then the line would look like this:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 mycpanelserver

  1. You have to have a domain of some sort if you are on the internet and you can give your server it's own name in your domain. For example if you own the domain name mysite.com then you could use server1.mysite.com or svr1.mysite.com or one.mysite.com. As long as you don't use either www.mysite.com or just mysite.com (these should point to your website on the server) you will be fine. Just make sure that you get with your domain registar and have an entry added that points to the primary IP address of the server so CPanel license does not cause issues.

Thanks for all of the help guys.

Using CPanel, I change the hostname from "hostnamehere" to "hostnamehere.dedicated.co.za" and the error dissapeard.

I did not want to change the hostname to a FQDN because I was scared that the server will stop working for some reason.

I took a chance and changed it. Everything still works 100%, and the error is gone.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.