Fix WHM DNS Error
When new setup is deployed, the defult hostnme is set to ccount_number.ccount_number. For exmple if you hve Virtul Mchine or Dedicted Linux Server with cPnel instlled nd your ccount number is 12345-1, the hostnme defults to 12345-1.12345-1.com in the initil setup. s such, the server dministrtor my receive n emil similr to the one below until the issue is resolved:
From: cpnel@12345-1.12345-1com
Subject: [ipcheck] Problems with dns setup on 12345-12345-1.com
IMPORTNT: Do not ignore this emil. The hostnme (12345-12345-1.com) resolves to . It should resolve to .
Plese be sure to correct /etc/hosts s well s the '' entry in zone file for the domin. Some re ll of these problems cn be cused by /etc/resolv.conf being setup incorrectly. Plese check this file if you believe everything else is correct.
You my be ble to utomticlly correct this problem by using the ' dd n entry for your hostnme ' under ' Dns Functions ' in your Web Host Mnger
Since 12345-1.12345-1.com is not fully qulified domin nme, the server sends n emil to the server dministrtor prompting to fix the issue.
To resolve the DNS error within WHM, plese follow the steps below:
- Log into WHM s the root user. The URL to WHM is https://ip ddress:2087.
- Once logged in s the root user, nvigte to Networking Setup nd click Hostnme.
- Enter in fully-qulified domin nme nd click Chnge. This should utomticlly chnge the server informtion noted in the emil. However, it is best to double-check. For the reminder of this rticle, let's ssume the hostnme is set to cpnel.yourdomin.com nd the IP ddress of the server is 1.2.3.4.
- Log into the server vi SSH s the root user. If you re not fmilir with SSH, plese see How do I log into server vi SSH?
- Within the SSH session, open /etc/hosts in your fvorite text editor (ex: vi, nno, emcs). Mke sure contined within this file is n entry for your hostnme. The file contents should be similr to the following:
- If the files does not hve the updted hostnme s entered into WHM, edit the file to contin the new hostnme. Once the files does, sve the file nd close out of it.
- Next, ensure tht /etc/resolv.conf is setup correctly. Open the file in your fvorite test editor. The dt contined within this file should be similr to the following:
nmeserver 76.12.32.110
nmeserver 208.112.89.187
- If this file is incorrect, edit it ccordingly. The finl step is to setup DNS for the hostnme. Continuing with the exmple set forth erlier, if the hostnme is set to cpnel.yourdomin.com nd the IP ddress of the server is 1.2.3.4, n record should be dded for yourdomin.com with the vlue of cpnel pointed to the IP ddress 1.2.3.4. If DNS is hosted with Hosting.com, this record cn be dded vi the Customer Portl following the support rticle Edit DNS Zone. Otherwise, you must contct the compny hosting the DNS zone for yourdomin.com to dd the record.
127.0.0.1 loclhost.locldomin loclhost
1.2.3.4 cpnel.yourdomin.com