How to prompt WHM to install an automatic hostname after installation ? Print

  • 0


cPanel 'automated hostname' feature will provide a valid FQDN hostname (based on for a server hostname upon installation. It determines the validity of the hostname by attempting to resolving the IP address for the hostname.


Documentation page: Automatically-Issued Hostnames


However, there may be a time when you wish to force the server to use the 'automatic' hostname. It is possible to run the feature from the command line. This procedure will only work with server hostnames that are not resolving IP addresses.




1. Log in to the server by SSH as 'root', or use the WHM: Terminal Feature to reach the command line.


2. Run the following command which will determine the IP address status.





3. If the script determines the server is eligible, enter 'y' at the prompt to be issued the 'automatic' hostname on the server.


Example output: (IP is an example)

# /scripts/ensure_hostname_resolves
[!] Hostname does NOT resolve to the server.
[*] Do you want the system to update the hostname to an auto-resolving hostname? [y/n] y
[*] Configuring auto-resolving hostname...
Changing hostname to!


4. Verify your new hostname from the command line.



# hostname

Was this answer helpful?

« Back

Join us on Telegram channel


Send Message