This knowledgebase article applies to Windows Hosting only, below are the Linux instructions

 

After installing an SSL on your website hosting on our Windows servers you'll most likely want to force or redirect all traffic to https

Follow the steps below to add a redirect rule to your web.config that will force all traffic on port 80 to port 443 (SSL / https)
Download a copy of the web.config file which can be found in your domain's wwwroot
Open the file using a text editor such as notepad ++
Add the rewrite rule immediately after the following :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>


 <rewrite>
      <rules>
          <rule name="ZADNS 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>
      </rules>
</rewrite>


https redirect
Save the web.config and upload it to your website's wwwroot directory, overwriting the existing web.config
Your web.config should look simlar to the image below

https redirect web.config

Was this answer helpful? 10 Users Found This Useful (11 Votes)