Canonical url always changes to the current url woocommerce archive

#518433
  • Resolved Heintrue
    Rank Math free

    Hi!
    In WooCommerce I have my permalinks structured using the check box that says “Shop base with category”
    so archive pages look like this: example.com/products/category/subcategory/
    If you change the url in the browser to something like this example.com/products/random/subcategory then you will stay on the archive page without a redirect. Now if I inspect the page the link rel looks like this <link rel="canonical" href="https://example.com/products/random/subcategory"> instead of <link rel="canonical" href="https://example.com/products/category/subcategory"> as it should be.

    I tried deactivating all plugins except for woocommerce, I tried changing themes and I tried removing everything that was not needed in the htaccess without any result.

    The problem is I cannot reproduce the problem on a fresh install.

    Would you guys have any idea what could be causing this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    For initial troubleshooting, please go to your WordPress dashboard > Settings > Permalinks and click save changes without making any changes.

    This will flush out any old permalink settings.

    Let us know how this goes.

    Thank you.

    Hello Reinelle,
    Thanks for getting back to me!

    I actually found the solution a few hours ago.
    My Ajax product filters had a setting for canonical tags when filtering and that took effect over RankMaths canonical tag. I don’t know why it didn’t change the first time I disabled the plugin but after disabling that setting and clearing the cache it’s finally resolved.

    Have a wonderful day! 😊

    Hello,

    Glad that everything has been sorted out.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Canonical url always changes to the current url woocommerce archive’ is closed to new replies.