Thursday, 21 September 2017

How to Redirect http to https with Green Address Bar

How to Redirect http to https with Green Address Bar

Create Secure Connections with Green Address Bar and HTTPS

How to Redirect http to https with Green Address Bar

Now a days all people are making website with https secure connections with green address bar , most of they are using Lets Encrypt free ssl certificate.

If you are a Hosting user and got Cpanel from your provider.
Mostly all provider already installed ssl for you.
So no need to do anything extra.

So what to do now?
Visit your website with https://
if this is opening then SSL are installed and working fine.
If opening but no Green bar then you have to Optimize your site for ssl.

Now, I will tell you how to automatically redirect http to https:- 

Goto Cpanel> File Manager
Now we need a .htaccess file, if there is the file then edit that otherwise create one with the same name.
Now copy below code and paste into that file -

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

If you are using existing .htaccess file then look at that file carefully if already there is the first line code 

RewriteEngine On 

Then don't paste this two times, just replace with one.
Now your site will open with https.
And if the Green address bar is not coming then edit your website with the following things.
  • Don't use any http link on your website, All links will be https.
  • Don't use any external links.
  • Don't use links like this - , You have to use like this - about.html
It will 100% work for you, thanks for reading.
If you are facing any problem then comment below, I will surely help you.

No comments :

Post a comment