Mail SSL with AutoSSL gives wrong cert on shared ip


Jan 26, 2017
cPanel Access Level
Root Administrator

This must be a problem that other users have been having, but I have been unable to solve it my self and spend a lot of time trying to google it.

I have a VPS with WHM on, on the server I have multiple domains on a shared IP and everything is great. (At least I thought so) One of my users told me that everyone in his domain got a certificate warning while connecting to their SMTP server. Therefore I started digging around some more and noticed that this was a general problem for all the domains on the shared IP and a few of the domains on a dedicated IP.
I am unable to make my server return the correct SSL certificate when connecting to a domain on a shared IP. Even when SNI is set to "Yes" I get the wrong certificate listed when connecting.
If we say that the host is using "" and the domain on the shared IP is, then I want to be able to use the "Secure SSL/TLS settings" configuration that cPanel recommends.
The settings cPanel shows me (and my customers) is something like:
Username: [email protected]
Password: ***********
Incoming server: (Imap port: 993, POP3 port: 995)
Outgoing server: (SMTP Port: 465)

The settings work fine, except that many mail clients will show a warning while connecting, the reason for the warning is that the certificate for the host server ( is returned instead of the certificate for
When I look at "Manage SSL Hosts" I can see that there is a certificate for the domain at "mail.mydomain.DK" (Along with cpanel, webdisk webmail subdomains.)

My server is running
WHM v68.0.29


Staff member
Apr 11, 2011

Can you open a support ticket using the link in my signature so we can take a closer look?

Thank you.