cPanel 'automated hostname' feature will provide a valid FQDN hostname (based on cprapid.com) 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.
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)
[!] 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 111-111-111-111.cprapid.com...Success!
4. Verify your new hostname from the command line.