Redirect HTTP to HTTPS

If you have SSL enabled for your entire site, you will need to make sure that all links pointing to the HTTP version of your site will be automatically redirected to the HTTPS version.

In order to achieve this you have to add the following helper plugin. The plugin will add the correct redirect rule to your .htaccess file, and make sure that it always remains at the top for maximum efficiency.

📥  Download (.zip): WP Rocket | Redirect HTTP to HTTPS

Developers: You can find the code for this plugin on GitHub.

Heads up!
Only install this plugin yourself if you are comfortable editing files via (S)FTP!

The plugin itself works perfectly well; however, in case something should conflict in your custom environment, you might have remove this plugin manually via (S)FTP and edit .htaccess directly.

These are the rules that the above helper plugin adds to the .htaccess file:

# Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.