• Resolved clawduda

    (@clawduda)


    Hi,

    I checked out this article https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/ which explains that it is not good to remove the product and category bases from the url because it will impact performance.

    Instead of this, I did the following:
    1. In woocommerce I did not set any page for the shop url so my shop page is considered the homepage
    2. I have a custom made domain.com/shop/ as a page , which exports my design and products
    3. In the permalink settings i have set the following:
    – Product category base: shop
    – product permalink: /shop/%product_cat%/
    So in this way my links became the following:
    categories: domain.com/shop/category-name
    products: domain.com/shop/category-name/product name

    I am satisfied with the “look” of this url structured because it makes sens to me and to a customer. the /shop/ page is crawlable too (as opposed to a normal prefix that does not exist ) because I created it and displays the products too

    However the category pages now give a 404 error message, but the product pages work.
    If anyone has a good recommendation on how to fix this issue that will not affect performance.
    I am not entirely sure what kind of performance impact will it have if i remove the prefixes as explained in the woocommerce article i linked.

    Is there a good fix to this ?

    Thank you
    Claudiu

Viewing 1 replies (of 1 total)
  • brianmurphy

    (@brianmurphy)

    The number of products and categories is what will influence if removing the path prefix is a problem for you or not. Go ahead and try it. You have a staging copy of your site and good backups, right? ??

    The performance issue boils down to how much work PHP’s regular expression functions need to do when resolving the route to your endpoint. When you flatten the path hierarchy wordpress won’t know if your visitor is requesting a page, post, archive, etc until it runs through all of the possibilities.

Viewing 1 replies (of 1 total)
  • The topic ‘Question about base url prefix for products and category’ is closed to new replies.