Too many redirects (redirect loop)
ERR_TOO_MANY_REDIRECTS: causes of a redirect loop and how to fix it with HTTPS, www and WordPress.
A redirect loop occurs when the browser keeps switching between two addresses and never reaches the page.
Symptoms#
The browser shows "This page isn't working. redirected you too many times", "ERR_TOO_MANY_REDIRECTS" or "Too many redirects".
Causes#
- two conflicting rules (e.g. forcing
wwwand non-www), - forcing HTTPS in
.htaccesswhile the application redirects back to HTTP, - in WordPress, different values of WordPress Address and Site Address,
- a redirect or SSL plugin in conflict with the
.htaccessrules, - browser cache or cookies.
Fix#
- Clear cookies and cache for that domain or open the page in a private window.
- Temporarily rename
.htaccessto.htaccess-old. If the site starts working, the problem is in the rules (.htaccess basics). - Keep only one rule for HTTPS and one for www (Forcing HTTPS). Remove duplicates.
- WordPress: in the database or
wp-config.phpcheck thatsiteurlandhomehave the same, correct address withhttps://(WordPress domain change). - Disable redirect and SSL plugins and then set them up one by one.
- Check that a valid SSL certificate exists.
Ticket#
Open a ticket and attach the contents of .htaccess, the address that creates the loop and what you changed last.
Vam je bil ta članek v pomoč?
Hvala za vaše mnenje! Potrebujete pomoč? Odprite zahtevek.
Sorodni članki
.htaccess basicsWhat .htaccess is, how to edit it safely and examples of common rules.SSL certificate and AutoSSLHow to check your SSL certificate in cPanel and run AutoSSL if it was not issued.Forcing HTTPSHow to automatically redirect all visitors from http:// to https:// using cPanel or the .htaccess file.WordPress domain changeHow to change the address of a WordPress site to a new domain or from http to https without losing content.
