When a hostname certificate is issued, you will notice that the certificate includes the server's previous hostname.
The checkallsslcerts script, which orders new hostname certificates used for the cPanel services, looks at the current hostname and the hostnames in /var/cpanel/hostname_history.json for hostnames that resolve to the server when preparing a new certificate request.
- Move hostname_history.json out of the way.
- Move hostname_cert_csrs out of the way.
- Run the checkallsslcerts script to order a new certificate.