When attempting to obtain the Free cPanel-signed Hostname Certificate the following error is displayed with WHM:
The system failed to acquire a signed certificate from the cPanel Store because of the following error: Neither HTTP nor DNS DCV preflight checks succeeded!
When attempting to install the certificate with /usr/local/cpanel/bin/checkallsslcerts, the error below is shown:
Attempting HTTP DCV preflight check …
FAILED: Cpanel::Exception/(XID rv2jcq) “hostname.example.com” does not resolve to any IP addresses on the internet.
The error is caused by the hostname of the server not resolving to an IP address. Often this is caused by a default automatically-generated hostname.
Using the Change Hostname tool in WHM, you can change it to a domain that you have control over. From there you can create an A record to point it to the IP of your server.
Usually this is done from the domain registrar where purchased the domain. Alternatively, you can configure nameservers to point to your system to have the cPanel server manage the DNS. We have more information on this here:
https://docs.cpanel.net/knowledge-base/dns/how-to-set-up-nameservers-in-a-cpanel-environment/