Ssl – How to create and configure a self signed wildcard cert for IIS7.5

iis-7iis-7.5ssl

Hello I have multiple test websites I host on an offsite server hosted by the company I work for. The websites are not really related to one another and so have different domain names. The machine has one IP address and I want to keep it that way.

I would like for example, two of the websites to have SSL enabled for specific pages. One website is testsite01 and the other testsite02. From the office I work from on our local DNS server we have two names testsite01 and testsite02 pointing to the offsite server. In IIS each of those sites are hosted on port 80 and have different host headers matching the ones specified above.

The problem is when I create two self signed certs through IIS and apply them to each website hosted on different ports as IIS doesn't allow multiple HTTPS sites running on 443. I decided to give testsite01 a HTTPS port 443 and testsite02 HTTPS port 444.

When I visit testsite01 and visit a secure page under that site login.aspx I get a cert warning as this is a self signed certificate and I land on the correct page login page with the https address in the browser address bar. When I go to testsite02 and try to go to the same and visit the login.aspx page of that site which should also be secured, I get taken to the secure login page of testsite001.

I'm having real trouble understanding why this is happening, perhaps it is because I am using self singed certs and SSL cannot be run on port 444. The reason I am trying to do this using self signed certs is because this i only for testing and we don't want to buy an expensive wilcard cert for this purpose.

Please could anyone help or advise me?

Best Answer

You can create a wildcard certificate with the IIS Resource Toolkit (called selfssl.exe) if you need it to last longer than (I think) the 30 days that the built-in certificate generator in IIS Manager gives you (don't recall off the top of my head where that is; believe it's under "Certificates" in the right-side panel). If not, just use the built-in one.

This self-signed wildcard certificate (*.example.com), once created and in the certificate store, can be assigned to all your sites under IIS under the Bindings that are configured with a corresponding host header.