redirect http to https using htaccess, How to redirect http to https using htaccess

How to redirect http to https using htaccess

(Last Updated On: March 16, 2018)

Redirect http to https using htaccess

Redirect http to https using htaccess if you want to secure your website you must have to install SSL certificate

You may also like: How to Install SSL Certificate

Follow below step to redirect your website to https :-

Step1. Login to Cpanel

redirect http to https using htaccess, How to redirect http to https using htaccess

 

Step2. Go to Public_html Folder

redirect http to https using htaccess, How to redirect http to https using htaccess

 

Step3. Create .htaccess File

redirect http to https using htaccess, How to redirect http to https using htaccess

 

Step4. Edit htaccess File

redirect http to https using htaccess, How to redirect http to https using htaccess

 

Step5. Enter Below Code in .htaccess file and save

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

 

if you already have .htaccess file in your cpanel do not duplicate.RewriteEngine On

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website is using cookies to improve the user-friendliness. You agree by using the website further.

Privacy policy