Eric's Blog

IIS - Configure URL Rewrite to Redirect all Traffic to HTTPS

December 30, 2015

Get URL Rewrite

Install URL Rewrite from or the Web Platform Installer.

Configure it

Merge this into your existing web.config, and all traffic will be redirected to HTTPS.

                <rule name="Redirect to HTTPS" stopProcessing="true">
                    <match url="(.*)" />
                        <add input="{HTTPS}" pattern="OFF" />
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />

Eric Haskins

Written by Eric Haskins, maker of things.