How to

WordPress change website auto redirect https

WordPress change website auto redirect https





By default WordPress, The first when you install WordPress website system will auto-generate the .htaccess file. By default, .htaccess file doesn’t allow Cpanel hosting automatically redirect HTTP:// to HTTPS:// website.

If you want to change the default .htaccess file on Cpanel for auto
redirect website HTTP to HTTPS, you just have to do the following.

  1. Login Cpanel Hosting edits default file htaccess and adds code with on the below.
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Cpanel Edit .htaccess file
Cpanel Edit .htaccess file
Cpanel Edit .htaccess file and save file
Cpanel Edit .htaccess file and save file

CONCLUSION

Before you add code for auto-redirect HTTP t- HTTPS, you just make sure your cPanel hosting has SSL Certificat.

Most Popular

To Top