This article discusses how to use only one IP address and have multiple SSL installs on the single IP address. Typically each SSL install requires a dedicated IP address, that of which is not assigned to any other site in IIS, to work. This article will provide a workaround for that scenario and only applies to Dedicated or Virtual Machines running Windows with IIS7.
To configure an SSL in IIS7 with SSL host headers, follow the steps below:
- Log into the server via Remote Desktop. If you are not familiar with Remote Desktop, please see Connecting to a Server via Remote Desktop.
- Navigate to IIS (Internet Information Services) in the Remote Desktop session by either double-clicking the IIS icon on the desktop or going to Start > Run > and typing inetmgr.
- Expand the tree within IIS to view the websites. Under the Sites category, click the site in question. The right hand panel will show the specific site properties. Click Bindings… to view the host header values for the site. If host headers are setup correctly, click OK to exit the dialog box. Otherwise, correctly setup the host header values and then click OK to exit the dialog box.
- Also ensure that the SSL is already installed in IIS following Import an SSL into IIS 7.
- Next, open a command prompt by going to Start > Run > and typing cmd. Once the command prompt window opens, navigate to C:\Windows\System32\Inetsrv\ by typing cd C:\Windows\System32\Inetsrv\.
- Run the following command to set the secure bindings for each site in IIS that should use the certificate entering in the appropriate information for <IISSiteName> and <hostHeaderValue>:
appcmd set site /site.name:"<IISSiteName>"/+bindings.[protocol='https',bindingInformation='*:443:<hostHeaderValue>']
- In the case above, if hostingdotcomwebsite.com and hostingdotcomwebsite2.com are to use the same SSL, the commands to run are below. In this case since the site name in IIS is the same as the host header value, <IISSIteName> and <hostHeaderValue> are the same.
appcmd set site /site.name:"hostingdotcomwebsite.com" /+bindings.[protocol='https',bindingInformation='*:443:hostingdotcomwebsite.com']
appcmd set site /site.name:"hostingdotcomwebsite2.com" /+bindings.[protocol='https',bindingInformation='*:443:hostingdotcomwebsite2.com']
- Run this command for each site that needs to be use the certificate. Each site will then use the certificate that was installed on the first site with that IP address.