Force SSL in IIS7 (via URL Rewrite Module)

In order for this to work you’ll need to install the URL Rewrite module on your machine first.

Just know that after installing the module on your machine might force you to restart IIS and/or the machine itself.

Add the following to your web.config:





      <clear />

      <rule name=Redirect to https stopProcessing=true>

        <match url=(.*) />


          <add input={HTTPS} pattern=off ignoreCase=true />


        <action type=Redirect url=https://{HTTP_HOST}{REQUEST_URI} redirectType=Permanent />







Leave a Reply