Fix the ERR_TOO_MANY_REDIRECTS error on WordPress

Procédure

The ERR_TOO_MANY_REDIRECTS error most often comes from an HTTPS redirect conflict, an incorrect rule in the .htaccess file, site addresses that are misconfigured in WordPress, or a CDN set to an unsuitable SSL mode. This endless loop prevents your pages from displaying because the browser is continuously redirected from one URL to another. This tutorial applies specifically to LWS shared hosting plans and makes it possible to quickly restore access to your site.

The steps

  1. Clear the browser cache and test in private browsing

    Your browser sometimes keeps an old permanent redirect in memory. Delete the cookies and recent history related to your domain, or open a new private browsing window to check whether the block persists.

  2. Clear the LWSCache server cache

    From your domain dashboard in the LWS Panel, go to the Optimization and performance section then click LWSCache. In the window that opens, click the Clear cache button to purge all content cached by the server.

    Fix the ERR_TOO_MANY_REDIRECTS error on WordPress
  3. Check the SSL certificate and HTTPS redirect

    In the Security section of your panel, click the SSL icon. Check that the SSL Service line shows Enabled, then temporarily switch the SSL HTTPS Redirect option to Disable before clicking Validate to determine whether this rule conflicts with your site.

    Fix the ERR_TOO_MANY_REDIRECTS error on WordPress
  4. Temporarily disable the .htaccess file

    In the File Management section, open the File Manager then go to your domain folder in htdocs. Select the .htaccess file and use the Rename tool to rename it, for example to htaccess.txt.

    Fix the ERR_TOO_MANY_REDIRECTS error on WordPress
  5. Check or force the addresses in wp-config.php

    Still in the File Manager, open the WordPress wp-config.php file (open source content management system available on https://wordpress.org). Add the directives define('WP_HOME','https://learnlws.fr'); and define('WP_SITEURL','https://learnlws.fr'); before the line indicating to stop editing (replace learnlws.fr with your actual domain), then click Save changes.

    Fix the ERR_TOO_MANY_REDIRECTS error on WordPress
  6. Adjust the Cloudflare CDN configuration if applicable

    If you use the Cloudflare distribution network (optimization and security service available on https://www.cloudflare.com), go to the SSL/TLS settings for your zone. Make sure the encryption mode is set to Full or Full (strict), and not Flexible, which almost systematically causes an infinite redirect loop.

  7. Analyze the redirect loop

    To confirm that the issue is resolved, test your address from a command terminal with the curl tool by running the command curl -IL https://learnlws.fr (adapting the domain name). You can observe the chain of HTTP codes returned and verify that a 200 success code is ultimately obtained.

Frequently asked questions

What is a redirect loop?

A redirect loop occurs when a page A redirects to a page B, which in turn redirects back to page A (or to itself). The web browser detects these endless requests and stops loading with the ERR_TOO_MANY_REDIRECTS error.

Why does Cloudflare's Flexible SSL mode cause this error?

In Flexible mode, Cloudflare communicates with the LWS server over unsecured HTTP. If your hosting or WordPress configuration enforces HTTPS, the server sends Cloudflare back to HTTPS, which sends the request again over HTTP, generating a permanent loop.

What should I do if disabling the .htaccess file resolves the problem?

If renaming the file removes the error, it means a custom rewrite directive was incorrect. You can recreate a standard .htaccess file from the WordPress admin area by going to Settings then Permalinks and clicking Save changes.

How do I change my URLs if I still have access to the WordPress dashboard?

Log in to your WordPress admin panel, go to the Settings menu then General, and check that the WordPress Address (URL) and Site Address (URL) use exactly the same prefix (both with https:// or with the same www handling).

Should the SSL HTTPS Redirect be re-enabled in the LWS panel after testing?

If your site already handles the HTTPS redirect via the .htaccess file or a WordPress extension, it is recommended to leave the option set to Disable in the LWS panel to avoid conflicting double redirects.

help.lws.net/a/1308
Was this article helpful?

Yes

No

Read 48 045 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.