Baza znanja

How to add HTTPS (Green Padlock) to my website

If you have a valid SSL certificate installed on your site and you would like to force customers to connect over SSL. If you don't already have an SSL certificate installed you can purchase one through your my.rapidweb.co.nz account now or use the included free lets Encrypt certificate we provide on all accounts. Having an SSL Certificate and enforcing it will result in a better search ranking from Google and will give your customers peace of mind.

First, you need to create a file called .htaccess in your public_html folder. (If a file called .htaccess already exists simply edit that one)

At the top of your file add the following:

RewriteCond %{HTTPS} off

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

RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Now simply save you .htaccess file and your website visitors should now be forced to connect over HTTPS and redirected to WWW.

Let me explain how this works

RewriteCond %{HTTPS} off

First, we check to see if the client is already connecting over HTTPS or not

 

RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301

If not we redirect them to https://

 

RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Now we make the client use https://www.

 

If you require any assistance or would like us to enable and force SSL on your website please get in touch.  

  • 68 Korisnici koji smatraju članak korisnim

Je li Vam ovaj odgovor pomogao?

Vezani članci

Website Backups

1. Log into your cPanel account.2. In the "Files" section, click on "Backup Wizard" Icon.3. Under...

Should I use POP or IMAP?

IMAP and POP are the two primary protocols used by email clients for retrieving and storing...

Multiple SPF Records

Multiple SPF records are not recommended and may cause delivery and spam classification issues....

Getting your site on Google

You can submit your website to Google by browsing to this link:...

Setting up Google Analytics

Adding Google Analytics to your website is a great way to track visitors to your website, as well...