Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to setup two websites on IIS 6 with two diffent domain names - and And, i want to secure these sites with SSL. So, i got two certificates for each of the domains and installed it on IIS. When i try to access over SSL, it works. But, accessing over SSL throws message uses an invalid security certificate.

The certificate is only valid for

(Error code: ssl_error_bad_cert_domain)

Also, i couldn't start on IIS stating the port is already in use. I see a couple of problems here to solve.

How can i run both the websites on IIS with SSL? What is the cause of certificate error?

Thanks for reading!


Found a similar posting on SO here:

share|improve this question
I was just about to post the link to the question you just updated with. In essence they're the exact same question:… – Mark Henderson Dec 11 '09 at 2:45

1 Answer 1

up vote 6 down vote accepted

The problem is that SSL negotiation is done before the host headers are sent, so you can only have one SSL cert per IP address. This is why you are getting the invalid certificate on

there are two ways to handle this:

  1. Get a wild card cert for *
  2. Assign a second IP to the server and run off this second IP with the proper cert.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.