3

When Magento generated my sitemap.xml, the total amount of links are much fewer than the URL Rewrite links. Of course I understand that in URL Rewrite Management page, many of the links are redundant.

That's why I truncated the core_url_rewrite first then run the reindex. So now all the links are System generated links, not Custom links. But still the total amount of links in URL Rewrite Management is much more than the sitemap.xml.

I've enabled Product, Category and CMS Pages in System-Configuration-Google Sitemap. But still the total amount of links in sitemap.xml is much fewer. I would expect the same or not too many different.

Any reason why?

1
  • I'm not sure but maybe this has something to do with option Use Categories Path for Product URLs in System->Config->Catalog. If you have many nested categories, then there are many different paths to the same product - maybe those paths are not included in the generated XML sitemap.
    – zitix
    May 19, 2013 at 15:03

1 Answer 1

4

core_url_rewrite will contain every conceivable possible URL for category or product.

Eg. For this product

/sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html
/electronics/computers/laptops/sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html
/catalog/product/view/id/27/

Etc.

Whereas your sitemap is really for a search engine, and should only really contain the canonical URL for the product (which would depend on your store configuration settings for Use Categories Path for Product URLs).

3
  • Thank you. Whilst it's true that I enabled the Use Categories Path for Product URLs, however I didn't enable the Use Canonical Link Meta Tag For Categories and Use Canonical Link Meta Tag For Products which I believe it means the generated sitemap.xml should contain not only the Canonical URLs but also non-Canonical URLs. But anyway, I assume your answer is correct where Magento can only generate Canonical URLs despite my hope that it can also generate non-Canonical URLs. May 19, 2013 at 18:13
  • It can generate non-canonical URLs if you wanted to (ie. custom code) - but why bother? I'm not SEO - but I'm fairly confident you don't want search engines hitting 5 different versions of the same page. The canonical setting in the admin refers to the frontend source rel=canonical specially, nothing else. May 19, 2013 at 18:20
  • Also, please mark the answer as accepted - the BETA needs accepted answers to graduate. May 19, 2013 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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