- Plesk for Linux
- Plesk for Windows
How to change or get a server hostname on the Plesk server?
Note: A server hostname must be a fully qualified domain name (FQDN). Changes are not instant. It requires 24-48 hours to get a new hostname propagated through all the DNS servers.
Warning: Server providers might deny hostname change, in such cases contact the server provider.
Click on a section to expand
Go to the menu Tools & Settings > Server Settings, specify the new hostname in the field Full hostname and click OK at the bottom of the page to apply the changes:
Note: You should be logged in as the 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
Alternatively, the native SystemD utility(CentOS7/Debian8+/Ubuntu16) can be used:
# hostnamectl set-hostname host.example.com
# service sw-cp-server restart
# service sw-engine restart
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.
Please sign in to leave a comment.