• Resolved markussss

    (@markussss)


    Hi there,

    I am working with different SEO plugins, and I just came back to Yoast after some time. I was sure I was able to easily get rid of the product-category in the permalink like shown here https://yoast.com/help/how-to-remove-the-categories-prefix/

    Will this setting be only applied to the native post categories?

    Can I disable product-category with Yoast somehow? I know I can just get it done by some custom code snippet or redirect, but I prefer a stable and clean solution for this

    best wishes
    Markus

Viewing 2 replies - 1 through 2 (of 2 total)
  • @markussss

    Thanks for reaching out!

    The Yoast SEO plugin doesn’t have the remove /product-category/ from the slug feature. Our feature removes the category URLs in WordPress that contain a prefix, usually?/category/, this feature removes that prefix for categories only. Like?/category/?for blog posts.

    However, in WooCommerce documentation, they don’t advise this in particular. You can read more about it here — https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/

    Removing /product//product-category/, or /shop/ from the URLs is not advisable due to the way WordPress resolves its URLs. It uses the product-category (or any other text for that matter) the base of an URL to detect that it is an URL leading to a product category. There are SEO plugins that allow you to remove this base, but that can lead to a number of problems with performance and duplicate URLs.

    Thread Starter markussss

    (@markussss)

    Thanks a lot – I did quite a lot of research on that topic now and also run tests. The link of the WordPress developer documentation was very often mentioned, but the arguments there are not really strong from my point of view. I also tested it and didn’t run into any problems, which is odd as everybody advices against it. It’s true though, I couldn’t have a page slug similar to a category slug in this case (not sure right now whether duplicate slug is perhaps anyway not allowed, no matter the full permalink structure).

    I understand now why Yoast is not providing this feature and I don’t need to look further.

    From what I have read though, it’s strange that it’s handled this way.

    Especially as even the example in the WordPress documentation does not make much sense – the following permalink is definitely not standard “https://yoursite.com/about-page/product-category/category-x/” I wouldn’t even know how to get it without Permalink Manager or modifying the Site URL

    Example from the documentations:

    Thanks for providing that input

    best regards
    Markus

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get rid of product-category in the permalink of WooCommerce categories?’ is closed to new replies.