Configuring Host Headers to use SSL in IIS 7 or 7.5

Ever try to apply a Wildcard certificate in IIS to multiple sites and use Host Headers?

IIS allow you to use one SSL certificate for multiple IIS websites on the same IP address via Host Header values. Through the IIS Manager interface, IIS only allows you to bind one site on each IP address to port 443 using an SSL certificate. If you try to bind a second site on the IP address to the same certificate, IIS 7 will give you an error when starting the site up stating that there is a port conflict. In order to assign a certificate to be used by multiple IIS sites on the same IP address, you will need to set up SSL Host Headers by following the instructions below.

Setting up SSL Host Headers on IIS 7

  1. Obtain an SSL certificate and install it into IIS 7
  2. Once you have the Certificate installed open a Command Prompt with elevated permissions
  3. Change directory to C:\Windows\System32\Inetsrv\ (“cd C:\Windows\System32\Inetsrv\” )
  4. Run the following command for each site that you need SSL host headers configured for.
    • appcmd set site /site.name:”<IISSiteName>” /+bindings.[protocol=’https’,bindingInformation=’*:443:<hostHeaderValue>‘]
    • Replace <IISSiteName> with the name of the IIS web site and <hostHeaderValue> with the host header name for that site
  5. Open IIS and validate that the IIS Site binding is configured with HTTPS and the Host Header Value
  6. Test your site(s).
Advertisements