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

#35975
  • Resolved Qdleyi
    Rank Math free

    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.
    Website: https://www.luxyhijab.com
    Please let me know.

    Example:

    Page from navigation bar:
    /shop-hijab-collection/
    Redirect to:
    /shop-hijab-collection

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

    Thanks for your support.
    Regards,

    • This topic was modified 4 years ago by Qdleyi.
Viewing 15 replies - 1 through 15 (of 33 total)
  • Michael Davis
    Rank Math pro

    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.

    Qdleyi
    Rank Math free

    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 4 years ago by Qdleyi.
    Michael Martin
    Rank Math free

    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)

    Qdleyi
    Rank Math free

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

    Michael Martin
    Rank Math free

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

    Todd
    Rank Math free

    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?
    https://rankmath.com/kb/check-plugin-conflicts/

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

    Qdleyi
    Rank Math free

    Hello,

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

    Thank you.

    Qdleyi
    Rank Math free

    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.
    regards,

    • This reply was modified 4 years ago by Qdleyi.
    Michael Davis
    Rank Math pro

    Hello,

    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.

    ā€‹ā€‹ā€‹ā€‹ā€‹ā€‹

    Qdleyi
    Rank Math free

    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.

    Todd
    Rank Math free

    Hi,

    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.

    Michael Martin
    Rank Math free

    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:

    https://reclaimdesign.org/home-decor-shop

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

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

    Todd
    Rank Math free

    Hi Michael,

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

    Michael Martin
    Rank Math free

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

    Michael Martin
    Rank Math free

    Hi Todd,

    https://www.dropbox.com/s/wiazpa9l6gwqfoq/trailing-backslash-shop-page.jpg?dl=0

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

    Thank you.

    Michael.

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

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