Too many redirects error
This affects customers using Cloudflare's Flexible SSL.
Problem
- Site crashes when WP Rocket is deactivated
- Too many redirects error in your browser:
Cause
If you use Cloudflare's Flexible SSL on your site, there are some circumstances that can lead to a redirect loop.
WP Rocket's Cloudflare add-on fixes the redirect loop issue automatically for you.
But if you deactivate WP Rocket without first enabling another solution, your site may crash and become inaccessible.
Your browser may show the ERR_TOO_MANY_REDIRECTS error.
Solution
If you have access to the admin area of your site:
- Install the official Cloudflare plugin and deactivate our Cloudflare add-on, before deactivating WP Rocket. Alternatively you can install this Flexible SSL plugin instead.
- Now you can safely deactivate WP Rocket.
If you don't have admin access:
- You will need FTP or File Manager access
- In your
wp-config.php
file add:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO'] ) { $_SERVER['HTTPS'] = 'on'; }
Your site should now function correctly.