Today I ran in to a problem in IIS, I wanted to configure multiple websites with SSL using a wildcard certificate but without using more than one of my fast dwindling supply of static IPV4 addresses.
Pre-requisites
You have the SSL certificate installed in IIS on a website
You know the website identifier (see here for instructions)
You know the IP address you are going to be binding to the website and header (domain name)
You know the domain name you are going to use to access the website
IIS6 Only: You will need to have adsutil.vbs on your server
IIS6 Instructions
Remove any current SSL binding from the website in the IIS Manager
Open a command prompt window and go to the folder where you have adsutil.vbs installed
Run the following command:
cscript.exe adsutil.vbs set /w3svc/identifier/SecureBindings “ipv4Address:443:hostHeader“
So for example:
cscript.exe adsutil.vbs set /w3svc/1022912887/SecureBindings “192.168.10.131:443:www.myDomain.com”
IIS7 Instructions
Remove any current SSL binding from the website in the IIS Manager
Open a command prompt will elevated privelages (Run as Administrator)
Navigate to the C:WindowsSystem32inetsrv folder
appcmd set site /site.name:sitename /+bindings.[protocol=’https’,bindingInformation=’ipv4Address:443:hostHeader‘]
In both cases you should now see a binding in IIS for that port but you will not be able to see the host header that is bound.