• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Redirection Issues Website

Sally1

Regular Pleskian
Hello,


I checked my website https://lemontrend.com under http://www.redirect-checker.org , and found out that I have 19 Redirects, and that the Versions http://, http://www., https://www. Not Point to https://lemontrend.com





Result: http://lemontrend.com



Too many redirects. Please try to reduce your number of redirects for http://lemontrend.com. Actually you use 19 Redirects. Ideally you should not use more than 3 Redirects in a redirect chain. More than 3 redirections will produce unnecessary load on your server and reduces speed, which ends up in bad user experience.



Result: https://lemontrend.com



Too many redirects. Please try to reduce your number of redirects for https://lemontrend.com. Actually you use 19 Redirects. Ideally you should not use more than 3 Redirects in a redirect chain. More than 3 redirections will produce unnecessary load on your server and reduces speed, which ends up in bad user experience.



Result: http://www.lemontrend.com



Too many redirects. Please try to reduce your number of redirects for http://www.lemontrend.com. Actually you use 19 Redirects. Ideally you should not use more than 3 Redirects in a redirect chain. More than 3 redirections will produce unnecessary load on your server and reduces speed, which ends up in bad user experience.



Result: https://www.lemontrend.com



Too many redirects. Please try to reduce your number of redirects for https://www.lemontrend.com. Actually you use 19 Redirects. Ideally you should not use more than 3 Redirects in a redirect chain. More than 3 redirections will produce unnecessary load on your server and reduces speed, which ends up in bad user experience.





I use OS ‪CentOS 6.10 (Final) Plesk Onyx (Apache and Nginx Running) and Cloudflare Flexible SSL Account Free)

Version 17.8.11 Update #37 with the following Settings in Plesk Panel:



Websites & Domains -> Preferred domain * - lemontrend.com

SSL/TLS Support marked

Permanent SEO-safe 301 redirect from HTTP to HTTPS – Not marked while when I mark this the website is afterwards not reachable



Apache & nginx Settings - Additional Apache directives - Additional directives for HTTP

RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'

RewriteRule ^(.*)$ https://lemontrend.com$1 [L,R=301]



On my Wordpress Website I have the following Plugins:



Really Simple SSL with the Setup:

success SSL is enabled on your site.

success Mixed content fixer was successfully detected on the front-end

success An SSL certificate was detected on your site.

success 301 redirect to https set: WordPress redirect

success Secure cookies set



Cloud Flare Flexible SSL Plugin installed



I checked all the Settings but I don’t know why there so many redirections, and how I can redirect all Url Versions to https

Have someone a similar Setup with Plesk, Apache, Nginx and Cloud Flare?



Thanks

Best regards

Sally
 
Hello,

I found the issue under Apache & Nginx Settings where the Point Enable nginx caching marked, and with this Config, the redirection errors occur.



3.png


Please see here the other Apache Config what I have:


1.png

2.png


What do I have to adapt to be able to use the nginx caching feature without getting 19 redirections? What other directives I can add for apache and nginx to speedup my website?

Thanks a Lot!

best regards
Sally
 
If you would decide to use only Nginx without Apache I can post my whole configuration, which most nginx-only-users use.
Until two years ago I also used the "normal" nginx as proxy server setup, but I always put the apache configuration in the .htaccess file, not in "additional directives for http". Gzip for nginx I always (no matter which kind of configuration setup) I put in the global nginx.conf in /etc/nginx/.(ubuntu).
 
Thanks for your reply. Do you have some example snippets for htaccess what I can use, and how I can use additional the enable nginx caching option?

Thx
 
Yes, here is my old configuration. It worked perfectly for WoltLab community software which is very similar to Wordpress. But I know you have to leave out the Woltlab section and have to use Wordpress specific configuration parts.
1. Box is the .htaccess configuration only for WoltLab Community Software
2. Box is the .htaccess configuration for SEO of WoltLab Software
3. Box is the .htaccess configuration especially for WORDPRESS installations

Code:
Options +FollowSymlinks

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /

# Rewrite application /calendar/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^calendar/(.*)$ calendar/index.php?$1 [L,QSA]

# Rewrite application /blogs/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^blogs/(.*)$ blogs/index.php?$1 [L,QSA]

# Rewrite application /photos/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^photos/(.*)$ photos/index.php?$1 [L,QSA]

# Rewrite application /forum/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^forum/(.*)$ forum/index.php?$1 [L,QSA]

# Rewrite application /
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
</IfModule>

# caching
<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|svg|swf)$">
    ExpiresActive on
    ExpiresDefault "access plus 10 days"
    Header unset ETag
    FileETag None
</FilesMatch>

# compression
<IfModule mod_deflate.c>
    <FilesMatch "\.(html|htm|css|js|xml|php|txt|svg)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
</IfModule>

<IfModule mod_headers.c>
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]

# Serve gzip compressed JS files if they exist and the client accepts gzip.
    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]

# Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
    RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
    <FilesMatch "(\.js\.gz|\.css\.gz)$">
    # Serve correct encoding type.
    Header append Content-Encoding gzip
    # Force proxies to cache gzipped & non-gzipped css/js files separately.
    Header append Vary Accept-Encoding
    </FilesMatch>
</IfModule>

Better to leave the following Woltlab part out:
Code:
# Rewrite application /calendar/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^calendar/(.*)$ calendar/index.php?$1 [L,QSA]

# Rewrite application /blogs/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^blogs/(.*)$ blogs/index.php?$1 [L,QSA]

# Rewrite application /photos/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^photos/(.*)$ photos/index.php?$1 [L,QSA]

# Rewrite application /forum/
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^forum/(.*)$ forum/index.php?$1 [L,QSA]

# Rewrite application /
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
</IfModule>

So, you will have the following which is an overall Apache specification:
Code:
Options +FollowSymlinks

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /

# caching
<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|svg|swf)$">
    ExpiresActive on
    ExpiresDefault "access plus 10 days"
    Header unset ETag
    FileETag None
</FilesMatch>

# compression
<IfModule mod_deflate.c>
    <FilesMatch "\.(html|htm|css|js|xml|php|txt|svg)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
</IfModule>

<IfModule mod_headers.c>
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]

# Serve gzip compressed JS files if they exist and the client accepts gzip.
    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]

# Serve correct content types, and prevent mod_deflate double gzip.
    RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
    RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
    <FilesMatch "(\.js\.gz|\.css\.gz)$">
    # Serve correct encoding type.
    Header append Content-Encoding gzip
    # Force proxies to cache gzipped & non-gzipped css/js files separately.
    Header append Vary Accept-Encoding
    </FilesMatch>
</IfModule>
 
Last edited:
Back
Top