Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running IIS 7 on Windows Server 2008.

I have two websites:

www.website01.com

www.website02.com

I have an SSL Certificate for each website.

When I access a secured page on www.website02.com I get the error:

www.website02.com uses an invalid security certificate.

The certificate is only valid for www.website01.com.

(Error code: ssl_error_bad_cert_domain)

I have googled this error and I understand that it is caused by the fact that I have bound both sites to the same IP Address / Port No. (443). However, I don't know what I need to do to remedy this situation.

Would someone please help.

Thanks in advance.

Kind Regards

Walter

share|improve this question

migrated from stackoverflow.com Nov 24 '09 at 2:07

This question came from our site for professional and enthusiast programmers.

1  
Assign another IP address to that box. Have one IP dedicated to each hostname. –  erickson Nov 23 '09 at 23:23
    
Thanks sylvarking. Would you kindly direct me to some reliable online instructions on how to configure multiple IP Addresses to a single NIC on Windows Server 2008? Thanks. –  Walter Lockhart Nov 23 '09 at 23:34
    
Please see the answers to this question here: serverfault.com/questions/58163/… –  Mark Henderson Nov 24 '09 at 2:32

3 Answers 3

The response by sylvarking / erickson worked for me: 'Assign another IP address to that box. Have one IP dedicated to each hostname.' Thanks. Walter.

share|improve this answer

You can only have one SSL cert per IP address in IIS.

share|improve this answer
    
Thanks Josh. Is it possible to use the same IP Address and change the Port No.? –  Walter Lockhart Nov 23 '09 at 23:30
    
No, you can't use a different port. Most hosting companies will assign you another IP for little or no additional fees. –  Josh Pearce Nov 23 '09 at 23:51
    
You can have separate certificates in separate ports on the same IP. –  Gonzalo Nov 24 '09 at 0:22
    
Gonzalo is correct, but remember the end user (or links) will have to reference the secondary site with the port: website02.com:444 –  Christopher_G_Lewis Nov 24 '09 at 5:06

The easiest thing to do is to get one certificate for both sites, one as Subject and the other as Subject Alternative Name (SAN). Your CA might charge extra for SAN but it's still cheaper than getting 2 certs.

This is supported by almost all browsers. But we had some problem with old Java and we had to upgrade the system to Java 6.

share|improve this answer
    
Certs are only about $10 for a basic one, so I dont know about it being cheaper, and it still doesn't fix the problem with multiple sites on the one IP. –  Mark Henderson Nov 24 '09 at 2:30
    
SAN certs work wonders, but for IIS 6 you need to configure the SecureBindings via a script: cscript.exe adsutil.vbs set /w3svc/ID#/SecureBindings ":443:host header" –  Christopher_G_Lewis Nov 24 '09 at 5:11
    
I recommend a SAN certificate as well so you don't have to buy another IP address. Once you have a certificate with both names, you can use these instructions to have IIS 7 use the certificate on both sites correctly: sslshopper.com/article-ssl-host-headers-in-iis-7.html –  Robert Nov 24 '09 at 15:00

Your Answer

 
discard

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