Multiple sites on IIS 7 using a single wildcard SSL

IIS lets you run multiple websites on a single server. If you want to make your site secure with an SSL certificate, you can install multiple certificates and assign them to websites.

If you plan to deploy your development, QA, staging or UAT on a single server with a single IP address, you can get a wild card SSL. If your sites are sub domains of a single domain, wild card SSL would let you use a single certificate on all the websites.

For e.g. if you are hosting multiple sites on a single server like development (dev.domain.com), QA (qa.domain.com), Staging (staging.domain.com), you can use a wild card SSL with a single IP address.

IIS GUI does not let you assign wild card SSL using bindings. If you need to assign wild card SSL to multiple sites, you have to do it using appcmd utility.

appcmd utility is located at C:\Windows\System32\inetsrv\

Go to command prompt and run the following command

appcmd set site /site.name:”SITENAME” /+bindings.[protocol=’https’,bindingInformation=’ipaddress:portnumber:domain.com’]

Update the following to match your site requirements

SITENAME: The name of the site you assign in IIS

ipaddress: The ip address of the website

domain name: Domain name you want to assign SSL certificate

Example

Development

appcmd set site /site.name:”DEVELOPMENT” /+bindings.[protocol=’https’,bindingInformation=’192.168.1.5:443:dev.domain.com’]

QA

appcmd set site /site.name:”QA” /+bindings.[protocol=’https’,bindingInformation=’192.168.1.5:443:qa.domain.com’]