Windows Server

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)



  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

    <rewrite>

    <rules>

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

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

    <conditions>

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

    </conditions>

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

    </rule>

    </rules>

    </rewrite>

  5. Now you can check if your website by enter www.youdomain.com in the browser ,It should redirect to the https version.
XsoftHost Support

Share

Recent Posts

Add Extra IP addresses to server configuration On Ubuntu 17.10 and later

Each failover IP address will need its own line in the configuration file. The configuration…

4 years ago

Create RAID Arrays with mdadm on Ubuntu

What is mdadm? The mdadm utility can be used to create and manage storage arrays…

4 years ago

How to change the maximum upload file size for PHP

There are several scenarios that you might need to increase or decrease your php maximum…

6 years ago

How to install Let’s Encrypt Plugin in WHM/cPanel

What is Let’s Encrypt? Let’s Encrypt is a free certificate authority provided by the Internet…

6 years ago

How to install python in my cPanel and add py extension

Python normally installed on all cPanel hosting server because most of Centos/red hat update system…

6 years ago

How to install and enable GUI GNOME Desktop on centos 7

Usually CentOS 7 comes in a numbers of variants, For most users, there are two…

6 years ago