Changing Server Hostname

To change the hostname of your VPS, enter the following command as root:

#hostname servername.yourdomain.com

To make the changes persistent across reboots please add/modify the following line in /etc/sysconfig/network:

HOSTNAME=servername.yourdomain.com

Also, please ensure to change the hostname from your VPS control panel. If you would like to get the hostname displayed in your billing profile to be updated please submit a ticket.

If you are using cPanel, you will need to resync your license with the cPanel license server.  To do this, run the following command as root:

#/usr/local/cpanel/cpkeyclt

  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

cPanel: Unactive License File

cPanel may spit out a "Unactive License File" error when new IP addresses or added or when your...

How do I know what server I am on?

You can find out what server you are on using two different ways, each one revealing which server...

Migrating Accounts to your server

Most control panels have built in control panel to control panel migration tools that you can...

Howto Re-Install cPanel/WHM and DirectAdmin

To Re-Install cPanel: 1. Reformat your VPS (rebuild) 2. You need to ensure that yum is...

How to setup rDNS on your VPS

You can set a reverse DNS (RDNS/PTR) entry in your VPS control panel. Click the "Network" tab and...