• Hi

    I’ve been setting up my store for a while (it being my first WC site), and I have just noticed something which is very confusing and I don’t understand why it is the case.

    In WP Settings > Permalinks, WP allows me to type in a ‘Product category base’, which I believe just defaults to ‘product-category’.

    However, WP also allows me to set a product URL base. Currently, that is set on ‘custom base’ with /shop/%product_cat%/ as the entry. I cannot recall whether this is the default option, or whether I tinkered with this for some reason ages ago.

    The ability to make them different means that if someone visited a product, and wanted to get a category manually, or discern the product category from the URL, they would be wrong and get a 404 error.

    For example, go to prouct:

    site.com/shop/category-name/product-name

    If someone wishes to discern the category url and go there, they will try:

    site.com/shop/category-name/

    And they would get a 404 error, because the working url structure is different:

    site.com/product-category/category-name/

    Could someone experienced with WC please explain to me why anyone would want an inbuilt ability to create inconsistent URLs? I would honestly very much appreciate know the reasoning.

    What is best practice?

    Ultimately I’d just want:

    shop.com/category-name/product-name

    or

    shop.com/shop/category-name/product-name

    Is there a best practice for this? I am utterly confused.

    Another thing: If I change the custom base and remove the ‘shop’ part, that is going to wreak havoc with all my product links. Can someone please also recommend the best way to handle bulk re-directs within WP/WC without dealing with each link individually? ie. every product that once had ‘shop’ as the base, should now redirect to the url without ‘shop’, etc?

    Much appreciated.

Viewing 15 replies - 1 through 15 (of 26 total)
  • Stef

    (@serafinnyc)

    It’s probably best if you show a screenshot of your settings.

    On some of my sites I don’t even use SHOP. I use Products Collections

    You can see below I use product for a product

    Single Product
    https://www.hushdotti.com/product/cleansing-balm-original/

    Categories https://www.hushdotti.com/collections/makeup/makeup-face/foundations/

    You are not tied down by any one way.

    Post a screenshot. I’d like to see how you have that set up.

    • This reply was modified 4 years, 5 months ago by Stef.
    Thread Starter jason9j

    (@jason9j)

    Thanks Stef. Nice website.

    here are my settings:

    https://pasteboard.co/Jb1PzdZ.png

    I feel it is inconsistent and confusing, but I also can’t change anything until I know the best way to handle redirects…

    Thanks again.

    Stef

    (@serafinnyc)

    Thanks. So your shop base should only be /shop/ take out that other junk. Because it’s already up above.

    Here view my settings for Hush. Sorry, on mobile phone so…

    View post on imgur.com

    How long have you had it this way? Simply change to correct it and add your 301s.

    • This reply was modified 4 years, 5 months ago by Stef.
    • This reply was modified 4 years, 5 months ago by Stef.
    Thread Starter jason9j

    (@jason9j)

    Great, thanks Stef. Really appreciate that.

    I can see you opt for naming them with different bases. I guess I need to have a think about exactly what I want.

    My only other question would be: can you recommend a way to handle bulk redirects? I may need to fix all this up with new URLs and that is going to be messy…

    Stef

    (@serafinnyc)

    You’re welcome man. Yes, this is probably one of the most important parts of any eCommerce business is getting these bad boys lined up. You want to do it right and stick with it. You can always submit your urls for reindexing after you’ve corrected them thru Google Search Console.

    Shopify is really good at this with the use of /Collections and /Products so on. It’s also pretty prevalent in my wife’s industry of beauty & fashion.

    I made the minor mistake of leaving them the default way, but after a year I changed them. It hurt for a little while but we’re okay now.

    Thread Starter jason9j

    (@jason9j)

    OK awesome.

    So essentially, it’s OK for the product bases to be different (category vs product), it depends on one’s preferences and market etc. But just get it right at the beginning if possible.

    Thanks to your insight, I’ll definitely address this pre- first-round of advertising, and I won’t convince myself to delay the issue…

    Thanks again.

    • This reply was modified 4 years, 5 months ago by jason9j.
    Stef

    (@serafinnyc)

    Yes. Because category more or less reflects a blog structure, whereas product relates more to eCommerce.

    /product-category/ is okay though. So don’t let that confuse you. I just preferred collections.

    It’s best to do a lot of research of your competitors and their url structure. What does Google look for as well.

    Thread Starter jason9j

    (@jason9j)

    Hi Stef – yes, sorry, I meant product category vs product page.

    It doesn’t seem like there’s an option to remove product-category (or whatever I type instead). It makes more sense to just go straight to the category name, without declaring that the next thing is a category. Blank would be better, but it seems they don’t want blog categories and product categories confused, I guess.

    I am also considering using the ‘Standard’ product base setting (site.com/product/sample-product/), because it seems I can’t just have site.com/product-name (ie. no base)….unless I can leave the ‘Custom’ field selected and blank?

    It’s odd that there’s not a radio option to make both bases consistent. But perhaps my problem is conflating URL structure with breadcrumbs/navigation. I just figure they should be as close as possible, hence my original confusion….

    Stef

    (@serafinnyc)

    Don’t over think it. It’ll drive you nuts.

    Shop Base
    site.com/shop/

    Single product URLs are
    site.com/product/sample-product/

    Product Category URLs are
    site.com/product-category/category-name/

    • This reply was modified 4 years, 5 months ago by Stef.
    Thread Starter jason9j

    (@jason9j)

    Thanks friend – you’ve probably saved me days of overthinking this, only minutes after you saved me months of delaying it….lol.

    Greetings from Australia.

    Stef

    (@serafinnyc)

    You got it! No kidding? We have a store in Nobby Beach. Don’t know if you’re near Gold Coast.

    Thread Starter jason9j

    (@jason9j)

    Ha! It seems another night owl is up working on websites too…

    Moved from Sydney to South Coast NSW – damn good decision. Funny how the power to create websites makes these things possible.

    • This reply was modified 4 years, 5 months ago by jason9j.
    Stef

    (@serafinnyc)

    LOL no I’m in the U.S. Outside Philly right now. Our partners run the store.

    Thread Starter jason9j

    (@jason9j)

    OK understood. I will definitely check it out in more detail now that I know it’s not yet another US product that I can’t access. The site looks great.

    Thread Starter jason9j

    (@jason9j)

    …hope all is OK in your neck of the woods, BTW.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Confusion:Why allow different product category base and custom product URL base?’ is closed to new replies.