3

Ecommerce shop has different pages for different product sizes:

  • /shirt-size-s/
  • /shirt-size-m/
  • /shirt-size-xl/

They all point to /shirt-size-s/ as canonical and only this page goes to sitemap.xml

What should happen when /shirt-size-s/ goes out of stock, but sizes M and L are still available? I guess I should:

  1. Remove /shirt-size-s/ from sitemap
  2. Add /shirt-size-m/ to sitemap
  3. Set canonical to /shirt-size-m/

Is this the best practice with current site structure?

2
  • 2
    How long do you expect this product to be out of stock? I would expect Google to take a couple weeks to react to any changes you make, so if it will be back into stock soon, you might not want to change anything. – Stephen Ostermiller Jan 26 at 0:16
  • @StephenOstermiller we're talking thousands of products. So some are gone for good, some are going to come back. – torasko Jan 26 at 8:25
2

Is this the best practice with current site structure?

In short, no.

Changing canonical URLs in response to something as dynamic as stock levels is unwise. That kind of instability is antithetical to search optimisation, and seems predicated on a poor understanding of what canonicals are intended to achieve.

I understand that you don't want to change site structure, but the right approach would be to keep size and other properties out of the slug, i.e., simply /shirt/ and deal with variants via parameters or fragment IDs, etc.

An interim solution might be to leave the canonicals alone, but ensure that all product sizes are visible and can be bought from any size page, that the page itself is not optimised only to a specific size, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.