A Hostname is the unique name given to a computer connected to the Internet. For example, the hostname for our main website is www.blacknight.com. The hostname is composed of two parts. The first part is the local name, which in this case is www. The second part is the domain name which is blacknight.com. When you combine the two parts you have the hostname.
Server hostnames are important and they should be carefully thought out before setting up a server. It is important to use a Fully Qualified Domain Name for your Cloud VM server as not doing so may cause issues with your mail, FTP and other services. The hostname you set up will need to have an A record pointing to the server itself.
If you were not aware of the importance of the hostname section during the ordering of the Cloud VM, below are the ways of changing it:
Through a command line interface:
First change the hostname with the following command:
(replace cloud.yourdomain.com with the hostname you wish the server to use making sure it meets the requirements mentioned above)
This will change the hostname immediately, however, this will not persists through reboots. To change the hostname permanently you will need to edit a file specific to your distribution:
navigate to the line starting with HOSTNAME and replace the one there with your desired one
When done press ctrl+x then y and hit ENTER.
Press shift+A to append the line, delete the content of it and type in the desired hostname.
When done hit ESC shift+; (semicolon to type in colon) wq and hit ENTER
If your Cloud VM plan came with Parallels Plesk control panel pre-installed you will need to change the hostname within that one as well.
After logging in head to the Server tab and click on Server Settings.
Replace the visible hostname there with the one you using the commands and steps above and click OK.