0

As mentioned in the Google's "Search Engine Optimization Starter Guide" (pg 11) a good SEO practice is to give the possibility to users to remove manually part of the URL in the address bar.

In my case:

mysite.com/shop/mycategory/myproduct <-- product page with category ok

removing now manually part of the URL above:

mysite.com/shop/mycategory/ <-- error 404
mysite.com/shop/ <-- works

Breadcrumb in the product page look like this:

home / shop / mycategory / myproduct

clicking on mycategory links to:

mysite.com/product-category/mycategory <-- works

The problem is that the two URL differs:

mysite.com/product-category/mycategory
mysite.com/shop/mycategory/

Any clue on how to resolve this?

lucsar
  • 21
  • 7

1 Answers1

0

From looking at the documentation and other similar posts, some permalinks are not recommended to be adjusted for performance reasons. Your

"mysite.com/shop/mycategory/myproduct" 

url is actually looking at:

"mysite.com/shop/product-category/mycategory/myproduct"

So it doesn't look like you will be able to shorten it in the way you describe, although you could restore the "product-category" permalink that i assume you have removed? this way the user will be able to shorten the URL without hitting a 404 error.

Community
  • 1
  • 1
Gillespie
  • 2,228
  • 2
  • 18
  • 25
  • what do you mean by "..i assume you have removed?"? actually I have the default settings for permalinks: product-category + product-tag. I've only selected a custom base with category: /shop/%product_cat% – lucsar Mar 25 '15 at 10:41
  • My point is that you should be able to deconstruct the URL: mysite.com/shop/product-category/mycategory/myproduct, but you will not be able to deconstruct the URL: "mysite.com/shop/mycategory/myproduct" – Gillespie Mar 25 '15 at 10:52
  • sorry but I cannot deconstruct even mysite.com/shop/product-category/mycategory/myproduct In fact, mysite.com/shop/product-category/mycategory <-- 404mysite.com/shop/product-category/ <-- 404 – lucsar Mar 25 '15 at 11:12
  • But you can mysite.com/product-category/mycategory - You can remove the shop permalink to achieve this. – Gillespie Mar 25 '15 at 11:44
  • I can't remove the shop base. If I do that, the "/product" base is used by default. The only way, at the moment, is to remove the category, keeping only the shop base "/shop". By this way, I have mysite.com/shop/myproduct and can deconstruct the URL with no problem. WC has a very strange way to handle this.. – lucsar Mar 25 '15 at 14:10