iis | seo | web-config | rewrite-rule | aspnet

Redirect HTTPS requests to HTTP using IIS Rewrite rule in Web.Config

by Abhith RajanSeptember 28, 2017 · 1 min read · Last Updated:
Share this

The below-given rewrite rule which redirects all the HTTPS request to its HTTP URL. Redirecting HTTPS to HTTP isn’t recommended considering many factors. If you don’t have SSL purchased for your website, there are some cool options, like Cloudflare, it has a free package where it adds security to your site as well as provides free SSL, will write about it in a separate post.

1<rewrite>
2 <rules>
3 <rule name="Redirect to HTTP" stopProcessing="true">
4 <match url="(.*)" />
5 <conditions>
6 <add input="{HTTPS}" pattern="^ON$" />
7 </conditions>
8 <action type="Redirect" url="http://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
9 </rule>
10 </rules>
11</rewrite>

Abhith Rajan

Written by Abhith Rajan
Abhith Rajan is an aspiring software engineer with more than 7 years of experience and proven successful track record of delivering technology-based products and services.
Buy me a coffee

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub

Related Posts

Related Services

SEO Checker | Test your website for free with Seobility

Instantly review your website for free with the SEO checker from Seobility and get tips for a better search engine optimization and higher rankings.

Screaming Frog SEO Spider

The industry leading website crawler for Windows, MacOS and Ubuntu, trusted by thousands of SEOs and agencies worldwide for technical SEO audits.