Fix a WHM hostname DNS Error

When a new setup is deployed, the default hostname is set to account_number.account_number.  For example if you have a Virtual Machine or Dedicated Linux Server with cPanel installed and your account number is 12345-1, the hostname defaults to 12345-1.12345-1.com in the initial setup.  As such, the server administrator may receive an email similar to the one below until the issue is resolved:

From: cpanel@12345-1.12345-1com 
Subject: [ipcheck] Problems with dns setup on 12345-12345-1.com 
IMPORTANT: Do not ignore this email. The hostname (12345-12345-1.com) resolves to <does not resolve>. It should resolve to <server IP address>. 
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 automatically correct this problem by using the ' Add an A entry for your hostname ' under ' Dns Functions ' in your Web Host Manager

Since 12345-1.12345-1.com is not a fully qualified domain name, the server sends an email to the server administrator prompting to fix the issue.

To resolve the DNS error within WHM, please follow the steps below:

  1. Log into WHM as the root user.  The URL to WHM is https://ip address:2087.
  2. Once logged in as the root user, navigate to Networking Setup and click Hostname.
  3. WHM Hostname
  4. Enter in a fully-qualified domain name and click Change.  This should automatically change the server information noted in the email.  However, it is best to double-check.  For the remainder of this article, let's assume the hostname is set to cpanel.yourdomain.com and the IP address of the server is 1.2.3.4.
  5. Change Hostname WHM
  6. Log into the server via SSH as the root user.  If you are not familiar with SSH, please see How do I log into a server via SSH?
  7. Within the SSH session, open /etc/hosts in your favorite text editor (ex: vi, nano, emacs).  Make sure contained within this file is an entry for your hostname.  The file contents should be similar to the following:
  8. 127.0.0.1 localhost.localdomain localhost 1.2.3.4 cpanel.yourdomain.com
  9. If the files does not have the updated hostname as entered into WHM, edit the file to contain the new hostname.  Once the files does, save the file and close out of it.
  10. Next, ensure that /etc/resolv.conf is setup correctly.  Open the file in your favorite test editor. The data contained within this file should be similar to the following:nameserver 76.12.32.110nameserver 208.112.89.187
  11. If this file is incorrect, edit it accordingly. The final step is to setup DNS for the hostname.  Continuing with the example set forth earlier, if the hostname is set to cpanel.yourdomain.com and the IP address of the server is 1.2.3.4, an A record should be added for yourdomain.com with the value of cpanel pointed to the IP address 1.2.3.4.  If DNS is hosted with Hosting.com, this record can be added via the Customer Portal following the support article Edit a DNS Zone.  Otherwise, you must contact the company hosting the DNS zone for yourdomain.com to add the record.

Was this answer helpful?

 Print this Article

Also Read

Check if IP is Blocked, How to Unblock it from Client Area

If you are hosted on a WHM/CPanel server with our Server Management package your servers you...

Modify the Number of cPanel SpamAssassin Processes

While cPanel does allow you to use the Spam Assassin service to filter spam from your email...

Forward Emails in cPanel

This article will show you how forward emails in cPanel Login to your cPanel Web Host manager...

Fix Suspended Page in WHM

This article goes over a problem some customers have when using the Suspended Page option of WHM....

How do I add a MySQL database in cPanel?

The following article explains how to add a MySQL database in cPanel. You can use cPanel's...