+ Start a Discussion

CalloutException: No subject alternative DNS name matching found.

Is there anyway to workaround the 

CalloutException: java.security.cert.CertificateException: No subject alternative DNS name matching found. error when calling out from apex?




It means that the webiste you are calling with HTTPS has a domain name that is different from what you're using.  So if you think you're calling "https://api.myservice.com", and the website's certificate is only for www.myservice.com, you get this error.  If you connect to the service using a browser, see if it has a security exception, and if not, if the domain name redirected, then check the domain name of the service you're calling to make sure it's the right one.


Wikipedia Article

Bjoern BoschmanBjoern Boschman

Hi folks,

what @SfdcSteven has written is true so far.

Unfortunatelly this error also occurs when multiple certificates are hosted on the same IP address.

It seems to me that salesforce is missing SNI support (see http://en.wikipedia.org/wiki/Server_Name_Indication)