Redirect HTTP to HTTPS in IIS

One of our developers wanted to automatically redirect http requests to https, so if a user browsed then they should be automatically redirected to A simple enough task to accomplish with a line of configuration in Apache:

Redirect permanent /

Unfortunately the web server is IIS and not Apache.  Fortunately there is an IIS extension called URL Rewrite that can accomplish this.

Head over to, download and install the extension.  It’s a very quick install and doesn’t require a reboot, at least not on Windows 2008 R2.

Once installed select the website you want to add the redirect to and there should be a new feature called URL Rewrite.


Open the feature and click on ‘Add Rule(s)…


Start with a ‘Blank Rule


There are several sections that must be filled in to create the rule.  In the ‘Match URL‘ section fill in the details as follows.


Add a new conditon In the ‘Conditions‘ section by clicking on ‘Add…


Fill in the rule in as follows.


Finally, fill in the ‘Action‘ as follows.


Click ‘Apply


And the rule should be complete and working.


Tags: ,

No comments yet.

Leave a Reply