How to Redirect website from HTTP to HTTPS on IIS7

How to configure IIS Redirect HTTP to HTTPS

To Configure IIS7 ,IIS8 to force using HTTPS for website follow these steps

  1. Make sure that Microsoft URL Rewrite Module installed on your server
  2. Install your SSL certificate in IIS 7 and bind it to your website or if you already install the SSL you can skip this step.
  3. Make sure Require SSL is NOT checked under SSL Settings for your website (uncheck the boxes that are checked in this screenshot)

    IIS Redirect HTTP to HTTPS

  4. Locate your web.config file on your root folder of your website and edit the file and locate <system.webServer> section and add the following after that section



    <rule name=”http to https” stopProcessing=”true”>

    <match url=”(.*)” />


    <add input=”{HTTPS}” pattern=”^OFF$” />


    <action type=”Redirect” url=”https://{HTTP_HOST}/{R:1}” redirectType=”Temporary” />




  5. Now you can check if your website by enter in the browser ,It should redirect to the https version.
Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp

Related Posts