RSS

Monthly Archives: August 2011

Setting up SSL Host Headers on IIS 7

How to configure the same SSL certificate for more than two websites in IIS 7?

Let me tell you the scenario here. I have purchased a SSL certificate which can be used for main domain (mydomain.com) and sub-domains (*.mydomains.com). I have created two websites (mywebsite and mywebsite1) in IIS 7. Now I would like to add a SSL certificate in both the websites. So how would I do that?

Following is a solution for above given problem:

1. Purchase SSL certificate and install it into IIS 7.

2. Once the certificate will be installed into IIS 7, then assign that certificate to the first website called “mywebsite”.

IIS Manager

3. Open Command Prompt window and type “cmd”. The “cmd.exe” will be displayed.

4. Now go to “C:\Windows\System32\Inetsrv\” in “cmd.exe”.

5. After that run the following command:

appcmd set site /site.name:”mywebsite” /+bindings.[protocol=’https’,bindingInformation=’*:443:mywebsite.mydomain.com’]

commandprompt

6. Replace “mywebsite” with your website name in IIS and replace “mywebsite.mydomain.com” with your actual domain.

7. Now using same way, you can assign same SSL certificate to “n” number of websites.

Happy Programming.

 
2 Comments

Posted by on August 25, 2011 in SSL

 

Tags: , , , , ,