How To Redirect Http To Https Using .Htaccess - Webcom Kenya Limited

Get a Free Domain Name On all our Hosting Plans with Free SSL Certificate

Have a Question?
Categories
< All Topics
Print

How To Redirect Http To Https Using .Htaccess

How To Redirect Http To Https Using  .Htaccess

1. Login to the cPanel, use the URL that was provided i.e. yourdomainname.co.ke/cPanel, then enter the cPanel login details to access the cPanel.

2. On the cPanel search for ‘File Manager’.

How to Upload Your Website Files

3. On the new window, Look for the public_html directory. The public_html directory is your web root, the directory in which you want to store all your website files. Click on ‘public_html’.

How to Upload Your Website Files

4. On the new tab look for .htaccess file if you can’t find the file you can search on the hidden files. Right click on ‘.htaccess file’ and click edit.

How To Redirect Http To Https Using .Htaccess

5. On the new window paste the following code and save, replace www.yourdomain.com with your domain name.

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

How To Redirect Http To Https Using .Htaccess

Previous How to Launch a Website Using Website Builders
Next How to Upload Your Website Files
Table of Contents
CALL ME
+
Call me!