Error of Unlimited Redirects or Error Too Many Redirects

Signs and Symptoms:

  1. Once entering the website, encountering an ERR_TOO_MANY_REDIRECTS error in the browser
  2. Message Text:
... redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS.
=====
In Firefox: The page isn’t redirecting properly.
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.

Suggested Quick Solution:

  • Check HTTPS Settings:- Ensure that your HTTPS settings are configured correctly.

    1. Refer to the HTTPS settings section in the panel.
    2. If the connection mode to the origin server is set to HTTP only, change it to “auto” or “both” mode and test it.
  • If the Problem Persists, the problem is in the origin server:

    1. Test whether the issue is resolved by deleting all cookies and browser cache. You can use the Incognito mode of the browser for this.
    2. Change your system settings to connect directly to the origin server (bypass CDN).
    3.  Test the scenario.

The cause of the problem

This error occurs when a page is repeatedly redirected to itself, or when several pages are repeatedly redirected to each other in a closed loop.

This problem is basically related to your website system and is not related to CDN. But in one scenario, it may occur due to incorrect HTTPS configuration:

  1. Suppose your origin server is configured to redirect HTTP connections to HTTPS. Therefore, the content is presented only in a secure connection (HTTPS) and if a client connects to your website in a not-secured conection (HTTP), it will be automatically redirected to the secure version.
  2. In addition, assume that your HTTPS settings in CloudGuard are set to HTTP to communicate with the origin server.
  3. In this case, if a client connects to the site via HTTP, it will be redirected to HTTPS as before, which is correct.
  4. But in the next connection, which will be with HTTPS, due to the configured settings, CloudGuard’s CDN will still use HTTP to receive information from the origin server.
  5. The origin server that has encountered an HTTP request sends a redirect response to HTTPS.
  6. The same response is transmitted to the client by the CDN, which redirects the client to the same page again.
  7. As a result, the client is placed in a redirect loop.

In this scenario, you should set the connection to the origin server to HTTPS or to automatic mode (Both) and avoid HTTP mode.