How to add https bindings to a website in iis7

by Mark 20. September 2011 10:34

We wanted for one of our web sites a binding like https://www.example.com but in iis7 manager I was not able to add a hostname for the https:

2011-09-20_101329

If this is completed it looks like this:

2011-09-20_101542

But I needed a real hostname. with some time searching the web I found a solution using the appcmd.

If I run a cmd with appcmd.exe or write a .cmd I was able to have my host binding with https.

appcmd.exe set site /site.name:”example.com" /+bindings.[protocol='https',bindinginformation='*:443:www.example.com’]

I added a second line for docs.example.com

and that’s what Iv got:

2011-09-20_103128

Of course I had to remove the empty hostname. So only www. + docs. were reachable thru https

my .cmd looked like this :

C:\Windows\System32\inetsrv\appcmd.exe set site /site.name:"example.com" /-bindings.[protocol='https',bindinginformation='*:443:'] /+bindings.[protocol='https',bindinginformation='*:443:www.example.com'] /+bindings.[protocol='https',bindinginformation='*:443:docs.example.com']

So I removed the standard binding an added my wanted ones.

2011-09-20_104217

But be aware that at this point there is no ssl certificate selected for this hostnames.

 

Best, Mark

Tags:

Administration

About the author

The authors are the admins at teamaton.

Isn't everyone a little admin?

Month List

Page List