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:

 <rule name="HTTP to HTTPS redirect" stopProcessing="true">
  <match url="(.*)" />
   <conditions>
    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
   </conditions>
  <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
 </rule>

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

SSLCheck

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