Redirect Chain




Wordpress LScache Plugin: Redirect Chain

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi, when i test with GT Metrix it gives me warnings to remove redirect chains from my domain to the cdn domain. This occurs when i enable css/js minify. It also gives me redirect warnings for the async.js and lazyload.js. Is this normal and i didnt see such redirects using Autoptimize? Edit: just noticed Gt Metrix is saying the CDN url is redirecting to the domain url. Shouldnt it be the other way around? Hi martychc23, My site running with CloudFlare and set minify css/js enabled but not successful to reproduce it on GT Metrix. Could you provide Report number and site link to us for check? P.S. you can get report number from LSCache -> report. Best, Eric Hi Eric, My report number is: CEDRYSJP Here is the issue im seeing on GTMetrix: https://gtmetrix.com/reports/www.celebrityhealthcritic.com/r5KkinFT Look at the redirects section on pagespeed and yslow tabs in GTMetrix. Thanks Hi martychc23, I just checked your site, there is no https://www.celebrityhealthcritic.com/min/018d7.js https://www.celebrityhealthcritic.com/min/018d7.js/ and other Remove the following redirect chain thing in your site by browser dev tool. 1. Please try purge all and purge from CDN, see if it works to you. 2. Stop CDN and try GTMetrix again, find which part is the issue come from. Best, Eric Hi, Ive gone back to using CDN enabler and Autoptimize so these errors dont appear anymore. Hi @martychc23, In your .htaccess, you have the following 301 redirection which caused the GTMetrix warning # Trailing slash RewriteEngine On RewriteCond % REQUEST_FILENAME !-f RewriteRule ^(. )$ https://www.celebrityhealthcritic.com/$1/ [L,R=301] Our JS optimization doesnt generate real files to get more efficient. The above rules redirected it. You may need to remove that line to get GTMetrix giving a higher score. Thanks Hai Ah, ok then. That htaccess code is meant to ensure there is a trailing slash at the end of urls to avoid duplicate content issues. So if i removed this code would i not then have duplicate content issues for urls with and without trailing slash? If you would like to keep it, thats fine, just need to add one more RewriteCond to exclude /min/ path before RewriteRule. Could you please provide the line i would need to include in my htaccess for this exclusion? try changing RewriteCond % REQUEST_URI !(. )/$ RewriteRule ^(. )$ https://www.celebrityhealthcritic.com/$1/ [L,R=301] to RewriteCond % REQUEST_URI !(. )/$ RewriteCond % REQUEST_URI !^/min/. RewriteRule ^(. )$ https://www.celebrityhealthcritic.com/$1/ [L,R=301] Thats great, thanks!



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference