Domains & DNS

WHM Cannot Create Accounts or Updates Fail? Fix Server DNS Resolution

DNS resolution failures can cause serious connectivity issues on your server. If your system can’t resolve domain names, it could be due to a misconfigured /etc/resolv.conf or missing Perl modules. This guide walks you through troubleshooting steps to restore DNS functionality efficiently.

Short answer: Many WHM errors, such as failing account creation, failed cPanel updates, licence errors and stuck AutoSSL, come from a server that cannot look up domain names. Test it with dig +short cpanel.net. If that fails, set working resolvers in WHM > Networking Setup > Resolver Configuration (which writes /etc/resolv.conf), make sure the firewall allows outgoing DNS on port 53, and check that NetworkManager does not overwrite your settings.

Symptoms of broken DNS on a server

  • Creating or removing accounts in WHM hangs or fails with lookup errors.
  • cPanel updates (/scripts/upcp) cannot download files.
  • The licence check fails although the licence is valid.
  • AutoSSL, WordPress updates or payment gateways time out.
  • Commands such as dnf update or curl report “Could not resolve host”.

Step 1: test DNS resolution

cat /etc/resolv.conf              # which resolvers the server uses
dig +short cpanel.net             # should print one or more IP addresses
dig @1.1.1.1 +short cpanel.net    # test a public resolver directly
getent hosts cpanel.net           # test through the system's normal lookup path
Result Meaning
All tests work DNS is fine; look elsewhere for the WHM error.
Only the public resolver works The resolvers in resolv.conf are wrong or down.
Nothing works Outgoing DNS is blocked, or the network itself is down.

Step 2: set working resolvers

The supported way on cPanel is WHM > Networking Setup > Resolver Configuration. Enter your host’s resolvers, or reliable public ones, and save. Use at least two. Our network team can tell you which resolvers to use in each data centre.

You can also edit the file directly:

# /etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8

Do not list the server itself (127.0.0.1) as a resolver unless it really runs a caching resolver. A cPanel server’s own DNS service answers for hosted domains, not for the rest of the internet.

Step 3: stop the settings being overwritten

On AlmaLinux and Rocky Linux, NetworkManager can rewrite /etc/resolv.conf when the network restarts or the server reboots. Set the resolvers on the connection itself:

nmcli connection show                      # find the connection name, for example eth0
nmcli connection modify eth0 ipv4.dns "1.1.1.1 8.8.8.8" ipv4.ignore-auto-dns yes
nmcli connection up eth0

On Ubuntu with systemd-resolved, set the resolvers in the netplan configuration instead, then run netplan apply. Older guides say to restart a “networking” service; that does not exist on current AlmaLinux or Rocky Linux systems.

Step 4: check the firewall

DNS uses port 53 over UDP and TCP. If you run CSF, make sure 53 is in both UDP_OUT and TCP_OUT in /etc/csf/csf.conf, then run csf -r. A firewall in your provider’s control panel can also block it.

Step 5: confirm the fix survives a reboot

Settings that work now can be lost at the next reboot if something rewrites them. During your next maintenance window, reboot the server and run the tests from Step 1 again. Also check that both resolvers answer, not only the first: a server with one dead resolver works, but every lookup that hits it waits several seconds before trying the other one, which makes WHM and websites feel slow.

dig @1.1.1.1 +short cpanel.net
dig @8.8.8.8 +short cpanel.net

Step 6: retry the failed task

/usr/local/cpanel/cpkeyclt          # refresh the licence
/scripts/upcp                       # run the cPanel update again

Then create the account again in WHM. If creation still fails, read the error shown in WHM and the cPanel error log:

tail -n 50 /usr/local/cpanel/logs/error_log

Other reasons account creation fails

Error Cause Fix
Domain already exists The domain is on another account or left in DNS Remove the old account, or delete the leftover DNS zone in WHM.
User name not allowed Too long, reserved, or starts with a number Choose another user name.
Disk quota or space errors The partition is full Free space with df -h and remove old backups.
Licence errors Licence not valid for this IP See our licence error guide.

Need help with this?

WHM throwing errors you cannot explain? Our server management team can diagnose and fix it.

See server management plansContact @CustomerPanel

Frequently asked questions

How do I check if my server can resolve DNS?

Run dig +short cpanel.net. If it returns no IP address, the server’s DNS resolution is broken.

Where do I change the server’s resolvers in WHM?

In Networking Setup > Resolver Configuration.

Why does resolv.conf keep changing back?

NetworkManager or systemd-resolved rewrites it. Set the DNS servers on the network connection or in netplan.

Can broken DNS stop cPanel updates?

Yes. Updates, licence checks and AutoSSL all need working DNS.

Should the server use its own DNS as a resolver?

Not unless it runs a caching resolver. Use your host’s resolvers or reliable public ones.


Sources