How to Redirect website from http to https

Here is the exact code to redirect website from http to https using .htaccess file.

After installing SSL certificate for your website. Please follow the below steps for Redirecting your blog or website from http to https using .htaccess file
How to Redirect website from http to https

  1. Login into your site cpanel.
  2. Open File Manager and get into public_html directory (check the option show hidden files).
  3. Select .htaccess file and open with code editor.
  4. Copy and Paste the below code in starting of the .htaccess file.
  5. Save it and open your site in the new tab and check it, your site will be redirected from http to https.

1 comment: