iss redirect http to https | Make more visitors


Once you installed the SSL certificate and it is activated your site will have https instead http. When people type URL of http and then your domain name they will redirected toward the secure connection. For the force redirection you have to setup some http and https rules manually.  Following details shows the setting steps which is required for ISS  redirect http to https.

  1. You have to download the “Rewrite” module and then install it on your computer.
  2. Open up the console of ISS manager and in the left side menu choose the site on which you want apply the https redirection rule:iisred1
  3. Here you can see the “URL Rewrite” icon, just double click on it.
  4. Now click on “Add Rule(s) in the menu of right side.
  5. In the “Inbound Rule” section click on “Blank rule” and then click on “OK” in the bottom of page.iisred2
  6. Enter your desired rule name.
  7. In the section of Match URL
    • Under the “Request URL” select the drop-down menu of “Match the pattern”.
    • Now under “Using” select the drop-down menu of “Regular Expressions”.
    • Enter “(.*)” in the pattern box.
    • Make sure that ignore check box is checked.iisred3Now we will look the Condition Section
  8.  Here Under the “Logical Grouping” drop-down menu choose the “Match All” and then click on “Add“.
  9. In the window of “Edit Condition”
    • Under “Condition input” enter the text “{HTTPS}“.
    • Now under “Check if input strings” select the “Matches the pattern“.
    • In pattern box enter “^OFF$” and then click on “OK”.iisred4Now we are “Action” section
  10. From the drop-down menu under “Action Type” choose the “Redirect” and paste the following code in the box of “Redirect URL”
    • https://{HTTP_HOST}/{R:1}
  11. Make sure to check the box of “Append Query string”.
  12. Choose the “Redirect type” as your desire.iisred5Note: You can select 4 types of redirect rule in the redirect type from the drop-down menu for ISS redirect http to https:
    • Permanent (301) : This is prefered when you want to permanently move the content of website to secure connection i.e https. It makes a positive effect on the visitor and clients and also easy to rank the site.
    • Found (302) : This option only be used when you want to move your web content of some pages to the temporarily new place. The search engine traffic will go the old location the web content. This choice usually not recommended for redirection of http to https.
    • See Other (303) : This redirect type is specifically use for guest request. This is also not recommended for the redirection of http to https.
    • Temporary (307) : This option is the successor of 302 http/1.1 and this is also not recommended for http to https.
  13. Now press the “Apply” button which is located on the right side of the action menu. In this way you can ISS redirect http to https.

In order to check that this method work on your site visit your site using http:// and make sure that the browser should not show the cached data of your website. Use the anonymous mode of whatever browser you are using.

If the rule is created and instead it is not redirected to the secure connection i.e https

Usually this rule you have written is located the web.config file in the directory documents of your website. If the ISS redirect http to https not worked in your case, check the web.config file in the directory of your website.

Do these steps to check the web.config file

  1. Right click on your site in the websites list of ISS and then click on “Explore” option.
  2. By clicking on “Explore” you will redirected toward the directory of your site.
  3. Check the web.config file in the directory.




Please enter your comment!
Please enter your name here