Force HTTPS for Website Content (SSL)

This article shows you how to force visitors to use https when visiting your website.

Edit the web.config file in the root folder of your website and add the following code to the <system.webServer> node.

 

<httpRedirect enabled="false" destination="" exactDestination="false" />

<rewrite>

<rules>

<rule name="Redirect to HTTPS" stopProcessing="true">

<match url="(.*)" />

<conditions>

<add input="{HTTPS}" pattern="^OFF$" />

</conditions>

<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />

</rule>

</rules>

</rewrite>

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Permit .html Server-Side Includes

On CeraNet's hosting plans, .shtml files are allowed in server-side includes by default....