Change a cpanel server hostname

pico /etc/sysconfig/network

pico /etc/hosts

pico /etc/resolv.conf

pico /var/named/ (add A record for host)

pico /usr/local/apache/conf/httpd.conf (may not exist anymore)

cd /usr/local/cpanel
then run

also might help license


You can also run: pico /etc/sysconfig/network and change it there.
Then run: hostname
Then reboot the server.

If you have a VPS than you might need to contact the VPS provider to change it from the VPS control center.

2 thoughts on “Change a cpanel server hostname”

  1. Alternatively, you can just go to WHM -> Server Configuration -> Basic cPanel/WHM Setup and change the entry for “Hostname.” Be sure to click the save button on the bottom of that page after you have made your modification.

Comments are closed.