Page Rule to Redirect Trailing Slash or Non-Trailing Slash to the Other?


#1

Hey there!

My site has an issue where we have trailing slash and non-trailing slash URLs. Both serve the same content, neither of them redirect to one another.

I understand this can be considered bad because of duplicate content, so I need to sort this out using Cloudflare’s page rules. However, I’m a bit at a loss as to how to do this without causing a big issue.

Examples:
https://twinfinite.net/2018/10/call-of-duty-black-ops-4-ps4-giveaway
https://twinfinite.net/2018/10/call-of-duty-black-ops-4-ps4-giveaway/


#2

:wave: @yamilla,

In the grand scheme of things I don’t think this is a particularly big deal for SEO, it’s probably more important to standardize how you create and reference links in your content to these pages than that they could be viewed as different content. https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html If you can’t change this behavior on the origin server, you could do so using :logo: Workers. https://developers.cloudflare.com/workers/recipes/vcl-conversion/conditionally-changing-a-url/

-OG


#3

This topic was automatically closed after 31 days. New replies are no longer allowed.