Installing SSL on IIS7 with host headers

I have one wildcard SSL certificate and needed to use it on multiple subdomains. The IIS7 UI doesn’t allow you to specify the host header when configuring an ssl binding. The only way I found to do it was by using appcmd from the command prompt. The command works as such:

appcmd set site /site.name:"<IISSiteName>" /+bindings.[protocol='https',bindingInformation='*:443:<hostHeaderValue>']

<IISSiteName> is the name of your site in IIS. <hostHeaderValue> is the host header you’re trying to bind to.

I found this tidbit on http://www.sslshopper.com/article-ssl-host-headers-in-iis-7.html. According to their steps, you should install the ssl on one site with the admin console first before using appcmd. I’m not sure if this is true. I assume you can use appcmd for all of them.

Advertisements