Forcing HTTPS on IIS

If you have an SSL certificate on your web site and it is hosted by IIS then you may wish to force the use of https on all pages.  This can be accomplished by adding a rewrite rule to the web.config file.  An example web.config file is provided below.  You should replace "" with your domain name.  

<?xml version="1.0" encoding="UTF-8"?>





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

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


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


            <action type="Redirect" url="{R:1}" />






  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Purchasing an SSL Certificate

***You must have a dedicated IP to install a certificate on your site***1. Sign In to our...

Generating a CSR on Linux

If you are purchasing an SSL certificate from CeraNet (Order Online) then we offer easy to use...