- Plesk Onyx for Linux
- Plesk Onyx for Windows
When trying to open a website
example.comin a browser, the following error is shown:
Sometimes error starts occurring after enabling Google PageSpeed.
Redirect checkers like redirect-checker.org shows that
example.comis redirecting to
www.example.comand back again.
Preferred domain value is set to
www.example.comat Plesk > Domains > example.com > Hosting Settings.
Redundant redirects which lead to infinite redirect loop.
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
Open Plesk > Domains > example.com > Hosting Settings
Change Preferred domain value to
None, disable Permanent SEO-safe 301 redirect from HTTP to HTTPS option and click Ok:
Make sure that there are no any redirect rules in Plesk > Domains > example.com > Apache & Nginx Settings.
Review redirect rules in
.htaccessfile like the following:
CONFIG_TEXT: Redirect 301 /index.html http://www.example.com/
Note: Number of redirections can be checked with the commands below. If result > 4, redirections are fine:
Click on a section to expand
# curl -s -k -L -I example.com | grep -E '301|302' | wc -l
# for i in $(plesk bin domain --list); do echo $i && curl -s -k -L -I $i | grep -E '301|302' | wc -l; done