Updated: 22 October 2026 · Applies to: cPanel & WHM
On a newly set up cPanel server, you may get an email with a subject like this, warning that the system hostname does not resolve correctly:
IMPORTANT: Do not ignore this email. The hostname (hostname.example.com) resolves to [wrong IP]. It should resolve to [server IP]. Please correct /etc/hosts and the A entry in the zone file for the domain. Some or all of these problems can be caused by /etc/resolv.conf being set up incorrectly. Please check this file if you believe everything else is correct. You may be able to automatically correct this problem using "Add an A entry for your hostname" under "DNS Functions" in your Web Host Manager.
Fix it
- Log in to WHM (not cPanel) at
https://your-server-ip:2087. - Close the warning if it appears again, then find DNS Functions in the left-hand menu and click Add an A entry for your hostname. WHM checks your hostname and offers an Add the entry button; click it, and WHM adds the matching A record to the DNS zone on the server.
- Log out and back in to WHM to confirm the message no longer appears.
To test without logging in and out repeatedly, SSH into the server and run:
/scripts/ipcheck
This sends an email immediately if the hostname still does not resolve correctly.
If that does not fix it
Edit /etc/hosts over SSH and make sure it has a line like this, with your server's real IP and hostname:
127.0.0.1 localhost 203.0.113.10 myserver.example.com myserver
Run man hosts for the full format of this file.