Multiple SSL-enabled websites in IIS 7.5

I was trying to add an HTTPS binding with a self signed certificate to more than one website in IIS, to be able to run HTTPS pages in multiple sites on my development box. But it wasn’t working, I was getting some error messages. The first was:

"At least one other site is using the same HTTPS binding and the binding is configured with a different certificate.
Are you sure that you want to reuse this HTTPS binding and reassign the other site or sites to use the new certificate?"

Then this one, when removing an HTTPS binding:

"The certificate associated with this binding is also assigned to another site's binding.
Deleting this binding will cause the HTTPS binding of the other site to be unusable. Do you still want to continue?"

I was also getting this error, when trying to restart a website:

"This Web site cannot be started. Another Web site may be using the same port."

The key point to solve this problem is to have each SSL-enabled website on a unique IP address.

To make it work, the first step is to assign multiple IP addresses to the network adapter (Properties of the network adapter -> Properties of TCP/IPv4 -> Advanced).

Multiple IP addresses in the network adapter

If you don’t have a self signed certificate yet you can create one in IIS Manager. Select the root node of the tree view on the left and choose Server Certificates on the middle panel. There’s a Create a Self-Signed Certificate option.

Once the self signed certificate is created, you’ll select the website in IIS Manager and click “Bindings” on the right side panel. You need to add an HTTPS binding to the website, typing a unique IP address in the “IP address” field. You’ll repeat this step for the other websites, but using a different IP address for each one.

Adding an HTTPS binding in a website in IIS

When finished, restart each website and they will be SSL-enabled. It’s okay to use the same self signed certificate for all websites.

You may need to perform some additional configuration to allow the host names of the websites to be resolved to their respective IP addresses in IIS. You can do that in your DNS server if you’re using one, or by editing c:\windows\system32\drivers\etc\hosts.

{ 2 comments }

  1. Thanks for the tip. However, I found on this post a much easier way for mutliple sites that have the the same main domain.

{ 0 Pingbacks/Trackbacks }

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>