Change a VPS's hostname on its Manage tab: type the new name in the Hostname card and press Update Hostname. Then Restart the server from the dashboard: the operating system picks up the new name at that restart. A hostname is only a label for the server; for it to reach the server from the internet you also need a DNS record.
Steps
- Open Servers, pick the server and go to the Manage tab.
- In Hostname, enter a name such as
web01.example.com: letters, digits, dashes and dots, 3 to 63 characters. - Press Update Hostname and wait for the progress bar to finish.
- Press Restart at the top of the page. On Linux, the restart sets the new name in
/etc/hostnameand/etc/hosts.
A reboot from inside the server (reboot) keeps the old name; only a restart from the dashboard applies it. Check it afterwards:
hostname
Changing It Without a Restart
To use the new name straight away, also set it inside the server:
sudo hostnamectl set-hostname web01.example.com
and update the line for the old name in /etc/hosts. Keep the dashboard name the same, or the next dashboard restart sets the dashboard name again. On Windows, if the name has not changed after a dashboard restart, rename the computer in Settings → System → About → Rename this PC and restart.
Point DNS at the Server
At your DNS provider, add an A record for the hostname with the server's IP address (shown on the Overview tab). Changes usually reach most resolvers within minutes to a few hours, depending on the record's TTL.
Dedicated Servers
A dedicated server's hostname is set by our team at handover. Change it inside the operating system with the command above.