Jason Parms

http to https

Website security is an inevitable need for any business, as the user will experience safe environment over the website. Many sites run with both versions HTTP and HTTPS that could cause SSL warnings and entice hackers to breach the website. It is recommended to force SSL connection on your entire website and ensure that web users are browsing your site over HTTPS secure channel.

To redirect website from HTTP to HTTPS, you need to contain following code using .htaccess or web.config files which depends upon server you use.

Linux & cPanel – Force HTTPS using .htaccess

You need to place below code in .htaccess file in the cPanel on your Linux based server. This code forces users to redirect to HTTPS connection.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Windows & Plesk – Force HTTPS using web.config

You should use following code using web.config in Plesk panel on your Windows based server to redirect web traffic on HTTPS secure website.

<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>

If you wish to provide safe browsing experience for your online visitors and looking for best SSL certificate, then SSL2BUY can help you to choose right certificate for your website. SSL2BUY offers wide range of SSL certificates at an inexpensive price that matches your business needs. When SSL is enabled on your website, your website will have green padlock and HTTPS just before your website name.

Leave a Reply

Your email address will not be published. Required fields are marked *

65 + = 71