- Plesk for Linux
How to change or get a server hostname on Plesk server?
Note: A server hostname must be a fully qualified domain name (FQDN). The changes are not instant. It requires 24-48 hours to get new hostname propagated through all the DNS servers.
Warning: Server providers might deny hostname change, in such case contact the server provider.
Click on a section to expand
- Login to Plesk
Go to Tools & Settings > Server Settings > Full hostname:
Note: You must be Plesk Administrator to be able to see or change the hostname.
Connect to the server using SSH as root
- To view hostname execute the command:
- To change server hostname execute the following command with preferred hostname value instead of host.example.com:
# plesk bin server_pref --update -hostname host.example.com
- Restart sw-cp-server and sw-engine services:
# service sw-cp-server restart
# service sw-engine restart
- If the hostname was not changed, use the native SystemD utility(CentOS7/Debian8+/Ubuntu16):
# hostnamectl set-hostname host.example.com
Note: In some cases, server restart is required.
For Google Cloud instance the changes will not be saved after server restart. Use the following workaround: https://cloud.google.com/compute/docs/instances/custom-hostname-vm