Need help with Initial WHM setup, step 4 nameservers error

sean2045

Member
Jul 1, 2012
20
0
1
cPanel Access Level
Root Administrator
Hi, i was trying to do the initial WHM setup in my VPS after cpanel installation, and I stuck on Step 4:Nameservers

here is what i entered:

Nameserver 1 ns1.mydomainname.com
Nameserver 2 ns2.mydomainname.com

Add A Entries for Nameservers & Hostname

Add "A Entries" for all Nameservers ( the box was checked)
Please enter an IP address for each of your nameservers.
ns1.mydomainname.com 11.11.111.111
ns2.mydomainname.com 11.11.111.112

Add "A Entries" for Hostname ( the box was checked)
IP for Entry: 11.11.111.111

When i clicked save and go to setup 5, I got following errors:

There was a problem saving your configuration
hostname_a_record: Sorry, that's an invalid domain

should i continue anyways? or why is this happening? does this happen to any of your guys too during the initial WHM setup?

Thank you

Sean
 

fijumen

Member
Jun 10, 2010
10
0
51
Same here, I have setup one server today and got the same error. I continued, everything works fine, but A record for hostname is not created.
 

sean2045

Member
Jul 1, 2012
20
0
1
cPanel Access Level
Root Administrator
I tried on two different VPS accounts on different companies, and both have this problem, i found the only way to solve the problem is create a new account in WHM using the domain name same as the your Host name, for instance, your VPS host name is vps.host.com, and you create a account by using host.com domain name. I'm not sure if this happens to Dedicated server as well, or only happens on VPS account or it supposes to be like this.

Quite confusing for new users which trying to avoid any errors pop on your screen.

Sean
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
An internal case exists for this issue. If the domain doesn't already exist on the machine, then the hostname (a subdomain off that domain) will fail when trying to add the A record. It happens for all environments, so VPS and dedicated alike. The case number is 59400

This is fixed in 11.32.4.6 and higher which is only currently in EDGE tier:

http://httpupdate.cpanel.net/

The changelog has the case listed at http://go.cpanel.net/changelog
 

NetMantis

BANNED
Apr 22, 2012
116
1
66
Utah
cPanel Access Level
DataCenter Provider
I can get around that issue and setup your DNS no problem whatsoever and helping people with DNS setup is something that I also typically don't charge anyone to do, often I just help people with that as a favor to anyone who typically asks me for my help since it usually only takes a few very quick moments to get DNS setup properly.

I actually have to leave right now and drive across town so I don't have much time to write a lengthy instruction message for everyone on how to properly setup DNS on Cpanel or getting around the "invalid domain" issue on the current release but if I get a few free moments, I can try to come back and do that so that everyone can know the ins and outs of what needs to be done to setup the DNS nameservers in more in depth detail.

The super quick basic overview though ---
Code:
1.   You need the DNS hostnames and IP registered under your domain at your registrar where you 
      originally purchased your domain name.

2.   You need the same DNS hostnames and IPs listed in /etc/nameserverips

3.   You need the DNS zone for your primary DNS domain added to your server either as a Cpanel account
      (if you will have a website on your primary domain) or as a DNS zone file alone (if no website) and in
      the zone file for your primary DNS domain, you need both NS and A records setup with the DNS hostnames
      and related IP information for your new DNS servers.

4.   In the "Basic Settings" section of WHM and/or reseller config whichever is applicable, you also need to setup
      the same DNS hostnames so that any new domains added to the server will automatically build DNS zone files
      which already by default point to the correct DNS hostnames.
On the issue of Cpanel rejecting the domain, you mainly need to add the domain to the server first per item #3 above and add an "A" record to the zone for the primary IP to be used for that domain itself. If that domain won't be having it's own website, just simply give it an "A" record with the primary IP address of your server.

That's really basically all there is to it. I don't really have time at the moment to go into a more lengthy discussion on DNS setup but the above is the main basic essentials of what you need to do.


EDIT: PS: Do NOT put your DNS hostname(s) and/or IPs in "DNS resolvers" or directly in the '/etc/resolv.conf' file! A very common mistake people often make is putting their own DNS hostnames in that section. Actually the DNS resolvers have nothing to do with the DNS resolution of any of the domains on your server. It's instead used to resolve domains elsewhere not located on your server such as being able to connect to Cpanel to download updates and so forth. You would not normally use your own hostnames or server IPs as the DNS resolvers.
 
Last edited: