IIS - Redirect HTTP to HTTPS

This manual applies to IIS 7 and above.

For IIS to redirect, it is necessary to install a specific extension. After installation it is possible to redirect a URL via the web.config from HTTP to HTTPS.

First download the URL ReWrite extension.

Install the extension and check wether the site your are going to redirect to, is available via HTTPS. When the site is not yet available via HTTPS, please use our manual to install and configure the certificate to have your site available via HTTPS. Make sure that the option Require SSL is not activated for your HTTP host, this will conflict with the redirect.

Open the web.config that you can find in the root of your website and add the following lines:

<?xml version="1.0" encoding="UTF-8"?>
            <rule name="Redirect to https" stopProcessing="true">
               <match url="(.*)" />
                  <add input="{HTTPS}" pattern="off" ignoreCase="true" />
               <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />

Save the modifications in web.config, the redirect should now be active.


Our SSLCheck will examine your website's root and intermediate certificates for correctness and report any potential issues

point up