- Plesk for Linux
How to change or get a server hostname on Plesk server?
Note: The changes are not instant. It requires 24-48 hours to get new hostname propagated through all the DNS servers.
In Plesk interface
The hostname on a Plesk server can be changed or viewed in two ways.
Through Plesk Web interface at Tools & Settings > Server Settings > Full hostname:
Note: You should be Plesk Administrator to be able to configure the following option.
Via Command Line Interface:
- Connect to the server using SSH.
- To view hostname execute the command:
- To change server hostname execute the following command with preferred hostname value instead of host.example.com and restart sw-cp-server and sw-enginer services after that:
# plesk bin server_pref --update -hostname host.example.com
# 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 example.com