How to Redirect wordpress website from http to https in htaccess

0
68
How to redirect wordpress website from http to https in htaccess

If you installed SSL or want to redirect website from http to https then its very simple. kindly follow the guidelines.

  • Login to “ WP-admin ”
  • On left hand side menu click “Settings”
  • Now you will see another list of menus, Click “General”
  • Change http:// to https:// in Address (URL) and Site Address (URL) options and save them
  • Now login to cpanel of your website
  • Go to “ File Manager ”
  • Click Settings option on top right corner and click show hidden files (Save them)
  • After saving you will see “ .htaccess ” file in public_html folder.
  • Click on it and Click Edit from top menu lists or you can right click on file and click Edit
  • Add the Given Code at Top of “ .htaccess ” file
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.website.com/$1 [R=301,L]

Simply change website.com to your website name and save it using the button on top right corner.

With this method all the links will be automatically redirected from HTTP to HTTPS on your website.

LEAVE A REPLY