Symptoms
-
When trying to open a website
example.com
in a browser, the following error is shown:PLESK_INFO: ERR_TOO_MANY_REDIRECTS
-
Sometimes error starts occurring after enabling Google PageSpeed.
-
Redirect checkers like redirect-checker.org shows that
example.com
is redirecting towww.example.com
and back again. -
Preferred domain value is set to
example.com
orwww.example.com
at Plesk > Domains > example.com > Hosting Settings.
Cause
Redundant redirects which lead to infinite redirect loop.
Resolution
Such issue can occur if redirect is already configured in .htaccess
file, in Apache &Nginx Settings or in web application (e.g. WordPress, Joomla) settings.
To fix the issue it is required to disable redirects in Plesk:
-
Log in to Plesk.
-
Navigate to Domains > example.com > Hosting Settings.
-
Change Preferred domain value to
None
and click OK: -
Remove redirect rules under Domains > example.com > Apache & Nginx Settings, if any.
-
Remove redirect rules in theÂ
.htaccess
file like the following:Redirect 301 /index.html http://www.example.com/
Additional information
Note: Number of redirections can be checked with the commands below. If result > 4, redirections are fine:
-
For a specific domain:
Note: change the “example.com” domain in the command below to the correct one.
# curl -s -k -L -I example.com | grep -E ‘301|302’ | wc -l
-
For all the domains:
# for i in $(plesk bin domain –list); do echo $i && curl -s -k -L -I $i | grep -E ‘301|302’ | wc -l; done