Ssl – IIS gives wrong certificate for an HTTPS request

httpsiisiis-7.5sslwindows-server-2008-r2

I am stuck in a situation which I cannot figure out. Here is my issue.

I got an SSL certificate from a trusted authority and installed it in my server. Then, I configured my website to use that certificate in port 443 with an IP address which is unused.

Then, I navigated to my web site to see if it works but I see that IIS gives the wrong certificate for this request. So, the browser blocks the response from being rendered.

I thought that IIS did something wrong while configuring and I checked the certificate mappings with the following command:

netsh http show sslcert

I get the Certificate Hash and run the following command to see if the certificate is the one that I need:

get-item cert:\LocalMachine\My\DC0D3FF5D752CD58FD291C48F30646FD9E0D8AED

It is indeed the one I needed. But, strangely I am still getting the wrong certificate when I navigate the web page.

Can u guide me where else I should look and what might be the cause of this?

Best Answer

Just to follow up on this for others that could not resolve it using the above solution, I had experienced a similar problem whereby the server was delivering the wrong certificate for HTTPS connections to a website with a host header value.

In my case, it turned out to be that the binding was set to receive connections from * instead of the actual server IP address. Modifying the binding to be bound to the IP address resolved the issue.