Thursday, September 27, 2012

SSL Site with Host Headers in IIS 7

We cannot use the IIS7 User Interface to add a host header to an SSL site binding. The Host name field will get disabled once we select the Type as https.

One way to add a host header to an SSL site binding is by using command-line tools. Another way is edit the applicationhost.config file directly.

1.  Add SSL bindings to your web sites with empty host headers
2. Find applicationhost.config file located in “C:\Windows\System32\inetsrv\config”. You need administrator permission to edit this file (Use Notepad in ‘Run as administrator’ mode )
3.  Search for the value ‘443’ in Find applicationhost.config file
4.  You can find “bindings” section inside the site node

5.  Add the required host header in bindingInformation property

6.  Save the applicationhost.config file
7.  Refresh IIS Manager and you can notice host header in https binding

No comments: