Host name does not match server certificate errors

Last Updated -

What does "hostname does not match server certificate" mean?
You may encounter a message that says "hostname does not match server certificate" while setting up your IMAP or SMTP mailboxes, or while setting up the JIRA integration. This error means that the DNS of the server that you are trying to connect to has a specific name, but there is a certificate physically installed on the server that is for another name, and that is the certificate that is being returned. When Desk.com see's the mismatch, it will return an error.

For example: You may know that your mail server is named mail.yourcompany.com . However, when you put mail.yourcompany.com in the Desk.com Admin as the hostname, you get the error. When you dig deeper, you may find that mail.yourcompany.com is an alias and the server is actually installed for server123.yourcompany.com .

This can occur whether you are actually trying to connect over SSL or not.

How can I determine the root cause of this message?
There are two possible methods for determining what exactly is causing this message. You might see the issue using the Digicert method, however, you may need to use the more advanced OpenSSL method if no errors are found in the Digicert method.

Digicert method:
On the surface, you can check the certificate on http://www.digicert.com/help . Plug the URL that you are trying to connect to into the field, and review the results. If there is a blatant mismatch or error listed, you will see it there.

You will more than likely see the server name that you are trying to connect to, and the server name installed on the certificate with the mismatch, or you might see some other error.

OpenSSL method:
This method is a bit more advanced, and you may want to have one of your network administrators run  assist you with running the commands.
Details for installing xCode and Homebrew, and the Terminal commands to be used can be found here:
https://gist.github.com/mbbx6spp/3e37671632ff9261ded7

Important note:  The xCode download is 1.6GB and may take a long time depending on your network.

How do I fix this error?
You will need to have someone with server access remove the offending certificate from the server that you are connecting to.