Redirect HTTP to HTTPS in IIS

Facebook
Twitter
LinkedIn

Never miss a post!

Sign up for our newsletter and get FREE Development Trends delivered directly to your inbox.

You can unsubscribe any time. Terms & Conditions.
Categories

Https has become the de-facto standard when it comes to setting up a site being internal or external. Apart from the security implications after changes to its ranking algorithm google gives sites with https entry point a higher ranking.

Eliminating the http entry point altogether is not an option as the users don’t type the https prefix. To solve this issue we can perform a redirect from http to https.  Redirecting traffic to our secure channel

The following is the procedure to redirect a site from HTTP to HTTPS protocol using IIS.

Launch IIS Manager and select the site you wish you redirect

Select URL Rewrite.

Add new rule

Add the URL Pattern

Setup the pattern to match the url.

Add a Condition

Add a condition that will be triggered based on attributes of the URL in our case it has to http traffic

Add an a Redirection action

  1. Change the Action Type to Redirect.
  2. Set the Redirect URL to https://{HTTP_HOST}/{R:1}
  3. Change Redirect Type to 303.

 

 

 

Facebook
Twitter
LinkedIn

Our website uses cookies that help it to function, allow us to analyze how you interact with it, and help us to improve its performance. By using our website you agree by our Terms and Conditions and Privacy Policy.