Normally we will set the hostname of a system during the set up procedure. Many peoples don’t worry about this, and don’t modify the hostname even if for example this was set to something really ridiculous by the datacenter that installed the system.
The process of changing your hostname is very simple.
1-Change The Hostname Through SSH
On any Linux system we can change the hostname with the simple command ‘hostname’ (surprised?)… Here is some quick usage of command line.
Log into your cPanel via SSH and run the following commands.
without any parameter it will outcome the present hostname of the system.
It will outcome the fully qualified domain name of the system.
It will set the hostname of system to new name.
Now You have to resynchronize the key with the cPanel licensing server.
2-Change The Hostname within cPanel
- Login to your WHM on your cPanel
- Scroll down to “Networking Setup”
- Click on “Hostname”
- Provide the new hostname at the bottom of the page and click “Change”
- Your hostname has now been changed.
After that You should probably “Add an A entry for your hostname” if you don’t already have one.