12.10. Enabling SSL on a Web Site


You want to enable SSL on a web site on which you have previously installed a server certificate.


Using a graphical user interface

To enable SSL on the MTIT Corp web site where we installed a server certificate in Recipe 12.9, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree to display the MTIT Corp web site, right-click on the site, and select Properties.

  3. Select the Directory Security tab.

  4. Under Secure Communications, click Edit.

  5. Select the checkbox labeled Require Secure Channel (SSL) and click OK twice.

To verify that SSL works, do the following:

  1. Open Internet Explorer on the IIS server and try to open an URL with the IP address of the MTIT Corp web site; for example, You should get an HTTP 403.4 error message: "Forbidden: SSL is required to view this resource."

  2. Try to open a secure URL with the IP address of the MTIT Corp web site, for example You should be able to view the default document (home page) of the site.

Using VBScript

' This code enables 128-bit SSL on a web site.
strComputer = "<ServerName>"
strSiteID = "<SiteID>" ' Taken from AccessSSLFlags ' 8 = AccessSSL ' 256 = AccessSSL128 intFlag = 8 + 256 ' ------ END CONFIGURATION --------- set objweb site = GetObject("IIS://" & strComputer & "/W3SVC/" & strSiteID) objweb site.AccessSSLFlags = intFlag objweb site.SetInfo WScript.Echo "Successfully ...

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.