Links as answers are not the best way to do this, because often these links become cold. Here is a summary of the answer posted above, as well as supporting information from other sources.
When it comes to SSL, host headers really remain in the cold. The purpose of SSL is to encrypt your traffic, and HTTP headers sent by the browser to the server are part of this traffic. One of these headers will be the Host header, which IIS uses to determine which site is loading with the request. Because the certificate must be downloaded to establish a secure connection before request headers are sent, IIS must select a certificate based only on the IP address and port number, thereby rendering the host header output useless. This, however, does not relieve us of the need to comply with STIG v6724, as it relates to the configuration of the IIS site. Thus, instead of allowing you to enter information, even if it is useless, Microsoft is trying to get rid of you by not allowing you to enter it at all. However, there is a way around this.
Note that this answer assumes that your certificate has already been created, added to the certificate store, and added to IIS. It also assumes that you do not need bindings to your site other than SSL.
First, we need to collect some information. We need a hash, an application identifier, and a host name.
- Open IIS, select your server, and double-click "Server Certificates" at the bottom. Pay attention to the "Issued" address. This is the name of our host. Save it.
- Choose your site
- Link your site to port 80 using the http protocol
- Delete all other bindings
- Link your site to port 443 using the https protocol
Open command prompt
netsh http show sslcert
Save certificate hash and application identifier
- Remove the https binding on your site.
At the command line:
netsh http add sslcert ipport=0.0.0.0:443 certstorename=my certhash=<put Certificate Hash here> appid={<put Application ID here>} appcmd set site /site.name:"<put site name here>" /+bindings.[protocol='https',bindingInformation='*:443:<put host name here>']
NOTE. Appcmd.exe can be found in the c: \ windows \ system32 \ insetsrv directory. You may need to be in this folder for this command to work.
- Remove the http binding from your site.
NOTE. You can leave the http binding if you want your site to be automatically redirected to https, but this is another topic.
source share