ERR_TOO_MANY_REDIRECTS

How to Fix The ERR_TOO_MANY_REDIRECTS Error

The ERR_TOO_MANY_REDIRECTS error is a common issue in web browsers, indicating that a website is stuck in a redirection loop, which can happen for various reasons. Here are some ways to troubleshoot and fix this error:

What is ERR_TOO_MANY_REDIRECTS?

ERR_TOO_MANY_REDIRECTS is a browser error indicating that a website is stuck in a “redirect loop.” This loop happens when the browser tries to load a page, but the server keeps redirecting it back to the same page or to other pages in a continuous cycle, eventually timing out.

This error can appear in different forms depending on the browser:

  • Google Chrome: ERR_TOO_MANY_REDIRECTS
  • Mozilla Firefox: The page isn’t redirecting properly
  • Safari: Safari can’t open the page because too many redirects occurred

Common Causes of ERR_TOO_MANY_REDIRECTS

  1. Misconfigured Redirects:
    • A common cause is when there are conflicting or improperly configured redirects on the server or within the content management system (CMS). For instance, the server may be redirecting between the http and https versions of the website or between www and non-www versions.
  2. SSL/TLS Settings:
    • Incorrect SSL settings, especially in services like Cloudflare, can trigger redirect loops. For example, using “Flexible” SSL in Cloudflare with a site that expects HTTPS connections can cause endless redirects.
  3. Browser Cookies and Cache:
    • Outdated or corrupted cookies or cache data can lead the browser to keep requesting redirected pages.
  4. Conflicting CMS Plugins:
    • Certain plugins, especially caching or redirection plugins (like those for SEO or security in WordPress), can create multiple redirects or interfere with existing redirects, causing a loop.
  5. Server Misconfiguration:
    • If multiple redirect rules are set up on the server (e.g., in an .htaccess file on Apache or a configuration file on NGINX), they may conflict and lead to a loop.

How to Fix The ERR_TOO_MANY_REDIRECTS Error

1. Clear Your Browser Cookies and Cache

  • Sometimes, corrupted cookies or outdated cache data can cause a redirect loop.
  • To clear cookies and cache:
    • Chrome: Go to Settings > Privacy and Security > Clear browsing data.
    • Firefox: Go to Settings > Privacy & Security > Cookies and Site Data > Clear Data.
  • Restart the browser and try accessing the website again.

2. Check Website URL Settings

  • If you own the website, verify that there isn’t a mismatch between the http and https versions of your site.
  • Make sure that:
    • Only one version (either http or https) is configured.
    • There are no conflicting settings in your content management system (like WordPress) or your .htaccess file that might cause a redirection loop.

3. Disable Plugins (Especially on WordPress)

  • Some plugins, especially caching or redirection plugins, can cause redirect loops.
  • Temporarily deactivate plugins to see if one of them is causing the issue:
    • In WordPress, go to Plugins > Installed Plugins and disable all plugins.
    • If the site works, reactivate plugins one by one to identify the problematic one.

4. Clear Server Cache

  • If you use server-side caching (such as a CDN like Cloudflare), clear the cache and disable any conflicting redirects on the server level.
  • In Cloudflare, go to Caching > Purge Everything.

5. Review .htaccess or Server Configuration

  • If you use an .htaccess file, check for conflicting redirection rules.
  • Remove or modify any unnecessary redirect rules.
  • Example for Apache:
# Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

6. Set Correct SSL Settings

  • If your site uses HTTPS, ensure that SSL is correctly configured.
  • In Cloudflare, set SSL/TLS to Full or Full (strict) rather than Flexible to avoid protocol conflicts that can lead to redirect loops.

7. Check for Conflicting Redirects on Different Layers

  • Sometimes, a combination of CDN redirects, CMS redirects, and server redirects can cause loops.
  • Verify each layer (CDN, CMS, server) and try to consolidate redirects in one place if possible.

8. Contact Your Hosting Provider

  • If none of the above solutions work, there could be a server configuration issue. Your hosting provider might be able to assist by checking the server logs.

By following these steps, you should be able to identify and fix the ERR_TOO_MANY_REDIRECTS error. Let me know if you need help with any specific step!