If you have an SSL certificate installed and working already, you can force HTTPS on your website by simply adding the following code into your web.config.
Before doing so, it's highly recommended that you make a backup of the web.config file before making any changes. Also, you can't simply copy/paste the code anywhere in the web.config. You'll need to select just the <rewrite> section below from start to finish and place it strategically in the web.config. Any issues with this, please contact support and we'll be glad to assist.
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Any traffic coming to the HTTP version of your website will automatically be redirected to HTTPS.
Please see our other knowledgebase articles regarding the same topic below:
- https://my.peopleshost.com/index.php/knowledgebase/7/Do-I-need-a-SSL-certificate.html
- https://my.peopleshost.com/index.php/knowledgebase/134/Do-I-need-a-dedicated-IP-address.html
- https://my.peopleshost.com/index.php/knowledgebase/8/Common-types-of-SSL-certificates.html
- https://my.peopleshost.com/index.php/knowledgebase/51/SSL-Site-Seal.html
- https://my.peopleshost.com/index.php/knowledgebase/12/Transferring-an-SSL-certificate.html
Looking for reliable Windows hosting with Award Winning Customer Support?
Grab your hosting today with a 20% discount. All plans come with our 60 Money Back Guarantee!
Check out our plans & promotions on our website -- https://www.peopleshost.com/