ServerWeb Hosting

How to perform HTTPS Redirection?

SSL Certificates is becoming almost problematic in our lives.  A primary example of this is that Google Chrome puts an unsafe link on the top left for websites that don’t have a SSL certificate. After this move of Google Chrome, good news came from many hosting control panels, especially from Cpanel, and a 3-month free version was produced for SSL certificates and users who wished started to activate this SSL certificate for 3 months. (If you don’t have a free SSL in your hosting panel, you can activate it by contacting your hosting provider.)

After you have someone install SSL certificate, or install it on your own, you need one more thing to do, which is to redirect your website to HTTPS protocol. So, SSL certificate becomes completely active for your website.

Note: For the “secure” writing on top left section, you need to change HTTP:// links which are found on your site codes to HTTPS://.

In fact, it isn’t too difficult to redirect WordPress users web sites to HTTPS protocol; it will be enough to change the URL on “WordPress address” and “Site address” fields to HTTPS:// by following Settings > General steps. Then, you can open resource viewer by browsing your website pages and pressing CTRL + U on each page and update it as HTTPS:// on your HTTP:// files.

Your website doesn’t necessarily be WordPress. If you’re using a Linux hosting service, you can perform HTTPS:// redirection via .htaccess file For this, you need to enter .htaccess file and add the codes below

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

If you have Windows hosting service, you can still perform HTTPS redirection for your SSL certificate. For this, enter your web.config file and add the codes below.

<?xml version=”1.0″ encoding=”UTF-8″?>

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name=”http to https” stopProcessing=”true”>

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

<conditions>

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

</conditions>

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

</rule>

</rules>

</rewrite>

</system.webServer>

</configuration>

And that’s it. Now, your website starts to work on HTTPS:// protocol and users signing in your websites can securely browse your website.

Tags

Related Articles

Leave a Reply

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

Close