<rule name=”HTTP to HTTPS redirect” stopProcessing=”true”>

<match url=”(.*)” />
<add input=”{HTTPS}” pattern=”off” ignoreCase=”true” />
<action type=”Redirect” redirectType=”Found” url=”https://{HTTP_HOST}/{R:1}” />



I was adding a new SSL certificate to one of the client’s website and now we wanted only https accessible and redirect user if he/she tries to access http://website.com

So, i thought of available options and from all of those he best is to add a rewrite rule and it will take care of redirection and we even don’t have to update the site navigation and other links. :)