Why ERR_TOO_MANY_REDIRECTS error occur?
ERR_TOO_MANY_REDIRECTS is one the very common error that would panic you when trying to use CDN or reverse proxy service like StackPath, Cloudflare, etc., for your WordPress site. To keep it simple, this redirect loop error is caused because your CDN wants to pull your HTTP only site but your WordPress site already have an HTTP to HTTPS redirect which results in redirect loop.
Nothing to worry, we will jump into the solution right away!.. Please make sure to clear cache on your browser & CDN platform before diving in.
SOLUTION 1
- Please login to your hosting panel, select FILE MANAGER tool.
- Choose to show “hidden” files in file manager settings.
- You will find .htaccess file in root directory of your WordPress site, please take a backup on your local computer and delete it.
- If HTTPS is enforced via .htaccess, err_too_many_redirects redirect loop should be resolved already (please make sure to clear cache & cookies of your browser before testing your site).
Once after gaining access to your wp-admin, you can go to Settings > Permalinks, choose your preferred permalink structure and save settings to re-generate default .htaccess file.
SOLUTION 2
- Please login to your hosting panel, select FILE MANAGER tool.
- Modify wp-config.php file located in the root directory of your WordPress site.
- Add the below lines of code in a new line above /* That’s all, stop editing! Happy blogging. */
define("WP_HOME", "http://YOUR_SITE_URL");
define("WP_SITEURL", "http://YOUR_SITE_URL");
Please make sure to replace YOUR_SITE_URL with your correct domain Ex: http://wpencryption.com
4. Save the changes, clear your browser cache and check if your site starts working.
SOLUTION 3
If none of the above solutions worked, ERR_TOO_MANY_REDIRECTS redirect loop must be caused by one of the redirect, SSL or similar plugin activated on your WordPress site. Using the FILE MANAGER on your hosting, you can simply go to wp-content/plugins/ directory and start renaming suspected plugin folders to PLUGINNAME-HOLD one by one and view your site to identify the exact plugin that’s causing the redirect loop.
If you are self managing server instance on cloud platforms like AWS, Digital Ocean, etc., HTTPS redirection must be enforced via Apache or Nginx server config file located in /etc/apache2/, /etc/nginx/ respectively. You will need to login via SSH console and remove those redirections to get your site working.
One of the above 3 solutions should absolutely fix ERR_TOO_MANY_REDIRECTS issue on your site. If you still need help, please consider opting for WP Encryption Pro plan and our highly experienced support will resolve it for you ASAP regardless of the complexity.
If you were able to resolve the redirect loop, We highly recommend using “Force HTTPS via HTACCESS” feature of WP Encryption free SSL plugin which auto detects the reverse proxy, CDN you are using and implements appropriate rules to make your HTTPS site work smooth!.
TIP: If you are using reverse proxy services like StackPath, Cloudflare – Please enable HTTPS enforcement on your CDN dashboard too.