-
Hi guys, sorry if this has been covered elsewhere, I’ve done a lot of searching and found similar issues but can’t figure this one out.
One our blog at https://www.oursite.com/blog we have tagged our blog posts, which results in category pages being created such as https://www.oursite.com/blog/category/lifestyle (note, no trailing slash). This is how we want it, we don’t want to add any trailing slashes anywhere.
ahrefs is complaining that our site contains “Canonical points to redirect” as in the image https://imgur.com/a/jOe93iN
The page was “first found at” the sitemap generated by Rank Math https://www.oursite.com/blog/category-sitemap.xml but this is fine, the URL there has no trailing slash. The problem appears when actually visiting the page, its
canonical
meta tag has a trailing slash, but visiting that URL returns a 301 redirect to the page without a trailing slash.Our Permalink settings are simple, with a Custom Structure selected of
/%postname%
and blankCategory base
andTag base
, but I don’t know if they effect this issue or not.I ran into a similar problem with trailing slash on the home page, which was solved using the Snippet at https://support.rankmath.com/ticket/wrong-canonical-url-on-home-page/ using
add_filter
Snippet using'rank_math/frontend/canonical'
, maybe a similar trick can be used to fix this canonical meta tag on Category pages.I was very impressed with the way you guys have helped others with these fine details, I hope you can help me out 🙂
Nick
The ticket ‘Category pages without trailing slash have canonical meta with slash’ is closed to new replies.