-
Canonical Product URLs in Magento eCommerce Platform
Posted on November 17th, 2009 No commentsQuestion:
Hey Joe -
In Magento, there is a short form of the product URLs that can be used and I just realized that many of the URLs in the site map that Magento generated uses these short URLs.
For example:
http://www.mydomain.com/category/subcategory/product.html (URL via catalog browsing)
can be shortened to
http://www.mydomain.com/product.html (URL used in site map and used for external linking)This is bad isn’t it? Shouldn’t there only be one? Do we need to rewrite all the shorts to long either in the site map, URL redirects, or both? It is nice having the option of the short URLs for promo’s, etc. But I understand this creates duplicate content which is a bad thing.
Looking forward to your thoughts. It’s also nice having Magento export a sitemap for us, but if it’s hurting us it’s not.
Answer by Joe:
The issue you are describing IS bad. The longer urls are category path urls. And if you had a product in 2 categories, then you would have 2 duplicate urls just because of the path structure. Add in the product detail default view (no category) which is used in the site map and you get a 3rd duplicate URL. So, the number of duplicate urls for a product in Magento is 1 + c where c is the # of categories that the product appears in at a minimum.
Google introduced a new feature earlier this year that eliminates this issue through the use of canonical product URLs. There is a good writeup about this on the Google Webmaster Blog, so I’ll let it explain the “fix” in more detail: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
Now, how do you fix canonical product URLs in Magento? You can write custom code in your template, or you can use a quick solution which is installing a module by Yoast. FYI, Yoast is a great SEO expert that I follow. He has optimized the Wordpress, Magento and Drupal CMSs. I’m not particularly fond of Drupal, but I do use both Wordpress and Magento. Note, I would use Joomla over Drupal. As for the module for Magento, it can be found here: http://www.magentocommerce.com/extension/906/canonical-url-s-for-magento
Keep in mind that the module IS going to set the canonical url up to be the product detail default which is the short url. This is perfect as (1) you want to use this url in link-building campaigns, (2) you want to use this link in emails for simplicity, and (3) this is the url that the sitemap feature in Magento uses.
As for the fact that duplicate content problems exist in most all websites… that’s a whole other issue. Here is some further information you might not have read about on duplicate content from the the Google Webmaster Central blog:
http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.htmlThis should definitely solve your problem. If you need help installing the module, just let me know and I’ll handle it for you.
-
Winter Funtime at the Office
Posted on March 10th, 2009 No comments
Last week we got about 8 inches of snow in Boone and about 10 inches of snow at the house (just outside of Boone). It snowed last Sunday and Monday, then got bitterly cold. The system came in from the southeast and met up with a cold front coming in from the northwest. If you live in North Carolina and the mid-atlantic region… you know this pattern are the real snow-dumpers. Read the rest of this entry »


