Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to change or get a server hostname on the Plesk server?
Answer
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.
-
Apply SSL certificate to Plesk (if it is needed) as instructed in the article How to secure a Plesk hostname.
-
Connect to the server using SSH as root.
-
To view hostname, execute the command:
# hostname
-
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
-
Restart services
sw-cp-server
andsw-engine
:# service sw-cp-server restart
# service sw-engine restart -
If it is needed, apply SSL certificate to Plesk
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.
Comments
1 comment
I think these 3 help articles should be linked together as it appears you need all 3 steps to make it work, yes ? after changing the host name and setting custom url, to then go and issue a new certificate
1) https://support.plesk.com/hc/en-us/articles/12377745012247-How-to-customize-Plesk-URL
2) https://support.plesk.com/hc/en-us/articles/12377750836375--How-to-change-or-get-the-server-hostname-on-Plesk-server
3) https://support.plesk.com/hc/en-us/articles/12377713798039-How-to-secure-a-Plesk-hostname-on-port-8443-with-an-SSL-certificate-Let-s-Encrypt-other-certificate-authorities
Please sign in to leave a comment.