This is more of an FYI but you may want to check if you have APO and Always Use HTTPS both turned on. I usually put the necessary redirects in .htaccess, which works fine with no duplication issues. But I thought I would try issuing them via Cloudflare for a small performance gain. Then I noticed this issue and have raised a support ticket #2048565. Waiting to hear back. I thought I could turn Always Use HTTPS off and use a page rule instead for the WWW (no https) but as long as APO is turned ON, page rule doesnât seem to have any affect. I use https://varvy.com/tools/redirects/ to map the redirects. While the duplicate redirect does ultimately resolve correctly, this canât be good for performance (even if it is just a small hit).
I see it looks like it puts the trailing slash on during the HTTPS redirect, and then redirects to remove the www. So itâs not a duplicate redirect. Itâs just inefficient.
Whereas without www, it redirects to https and adds the trailing slash at the same time.
Maybe @yevgen can take a look at the ticket you mentioned.
For most websites, this is a non-issue. You have your canonical URLs performing correctly (no redirects) and thatâs what matters. If youâve done your SEO properly, your URLs should already contain the correct protocol in Google and other search indexes, as well as in all links within your site. So most people will reach the canonical URL, and only a negligible few will ever type in your domain address onto a mobile browserâs address bar. (As a site admin, you may do this all the time, but your website users? nahâŚ) Thatâs why one should always test the speed by providing the correctly formed URL to test sites such as GTMetrix, webpagetest.org etc.
The exception of course is if your site has been around for a long time, and has many links pointing to it from other websites with the old, non-secure http protocol. In that case you need to chose between the performance degradation a double redirect at the Cloudflare edge causes, vs what would happen if all such requests were sent in to your origin server and only then trigger the .htaccess rule you mentioned. You can always test both and, considering how spread your target audience is globally, pick whatever best suits your site.
While I agree the whole âtoo many redirectsâ is generally a non-issue, APO seems to cause an extra redirect. It may unintentional and something the devs may want to correct.
There is no redirect logic in APO worker. Please confirm that disabling APO makes any difference in the redirects mapping.
I tried to restore the missing redirect above using a forwarding page rule but it doesnât make any difference, the no www redirect is still missing.
thatâs for the report, I will investigate APO integration with a redirect page rule.
Thanks, maybe also consider the 2 redirects with Always Use HTTPS.
If youâre talking about âwwwâ and âhttpsâ redirects, thatâs not something unique to APO, and is the subject of @cbrandtâs response. Itâs also covered in many posts here regarding GT Metrixâs âredirectsâ warnings.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.