Canonical url issue – slash (/) for shop category url

  • hello rank math team,
    Iā€™m having an issue with shop pages as it shows slash (/) at the end of the URL and that url always redirect to a version without the slash (/) so it gives 301 redirect automatically.
    How can I remove the slash from the urls ? Example in navigation bar shop collection or any other category in the home page it will always end with slash then redirect to non slash version.
    Please let me know.


    Page from navigation bar:
    Redirect to:

    So i want to remove the / to avoid the redirection.

    Thanks for your support.

    • This topic was modified 11 months, 4 weeks ago by Qdleyi.
Viewing 15 replies - 1 through 15 (of 33 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Rank Math does not add the trailing slash to site URLs, could you please head over to Admin > Settings > Permalinks and also Settings > General > Site Address (URL) and check whether the slash has been added to these settings?

    Looking forward to helping you. Thank you.

    Hello Michael
    Thank for your answer, I checked both but no luck I still have the same issue only for product category pages.
    The page it self opens perfect without the trailing slash but from homepage the URL have the slash so it redirect 301 to without slash

    • This reply was modified 11 months, 4 weeks ago by Qdleyi.

    Did you have any luck fixing this Qdleyi? I have the same thing happening on my shop page and have not been able to work out where the slash is coming from (custom permalinks are all set to have no trailing slash)

    Hello Michael Martin
    Actually not yet I searched everywhere but no luck!
    I will let you know when I find the solution.

    I’ve also spent a lot of time on it šŸ™ Hope you have more luck!

    Hi Qdleyi,

    Could you please confirm if this is only happening when Rank Math is enabled?

    To determine that, can you please follow this troubleshooting guide?

    Only the site admin would know and your users won’t be affected by this troubleshooting.


    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    hello todd,
    I checked the troubleshooting plugin and when I deactivate the rank math all works fine and without the trailing slash! but when I activate rank math and I use to strip category base the issue appears so please check it as I have updated the sensitive data.

    • This reply was modified 11 months, 3 weeks ago by Qdleyi.


    Thank you for contacting Rank Math today.

    I was able to log into your site and checked the issue. However, the site seems to be working just fine with either the Rankmath plugin activated and deactivated.

    Could you kindly record for me a screencast of the experience on your end so that I may be able to advise further?

    Looking forward to helping you. Thank you.


    Dear Michael Davis,

    Thank you for your continuous support and please note that i checked it again. here is the scenario:

    The home page have shop category pages under (The Collection) in navigation bar with Trailing Slash, when you troubleshoot just do the below please:
    1- enable all plugins except Rank Math + SEO for WooCommerce (which is by Rank Math).
    2- you will notice that all shop category pages from the home page links in navigation bar doesn’t have the trailing slash and all is perfect.
    3- when enabling rank math or SEO for woocommerce you will notice that URL links in navigation bar are having the trailing slash at the end of the URL.

    i know when you click on any URL with the trailing slash it will 301 redirect to non-trailing slash version which is okay but this is unnecessary redirect and not good for SEO.

    hope the above help to reproduce the issue.

    thank you.


    First of all, you do not need to install the SEO for WooCommerce plugin separately since that functionality is built into Rank Math.

    Secondly, Rank Math is adding the slash to your product category links because you have enabled the Remove category base option at WordPress Dashboard > Rank Math > General Settings > WooCommerce.

    I have alerted our dev. team about this issue and you will soon receive a workaround before we add a fix to the plugin itself. We are extremely sorry for the inconvenience this must have caused.

    I am getting the same issue on my shop page which is using the Ecwid shopping cart plugin. The trailing slash gets added at the end of the document load:

    I have General Settings/Links/Strip Category Base set to On.

    Please can you ask Dev to include a fix for this scenario too?

    Hi Michael,

    I do not see the trailing slash on your website. Where is it?

    Gets inserted after page load I mean to say (I can’t edit previous post)

    Hi Todd,

    If you open the Shop page link in previous post you will see it gets inserted after the page.

    Thank you.


Viewing 15 replies - 1 through 15 (of 33 total)

The ticket ‘Canonical url issue – slash (/) for shop category url’ is closed to new replies.