The Right Way of Updating The cPanel Hostname

There are 2 ways to update the cPanel hostname corectly, via WHM, and via the Hostname utility. In both cases, the hostname should be a FQDN (Fully Qualified Domain Name) and need to resolve in DNS (have an A record present). For mail deliverability reasons, the PTR record of the main cPanel IP should match the cPanel’s hostname.

Update Hostname via WHM

  • Go to WHM »Networking Setup »Change Hostname
  • Insert the new Hostname and click Change

Update Hostname via the command line Hostname Utility

Run the following script. Replace the example hostname with your own real hostname.