Search code examples
magentoseocanonical-link

How to add a canonical tag to a page in Magento?


I installed an SEO friendly URL module for tag pages. Now, people can visit any tag page on my site from 2 different URLs:

http://www.princessly.com/tag/product/list/tagId/3/

http://www.princessly.com/tag/royal/

My question is how can I add a canonical tag to /tag/product/list/tagId/3/ so that it's pointed to /tag/royal/ semantically?

A redirection would also do, but that would involve editing one of the core files at /app/code/core/Mage/Tag/controllers/ProductController.php which I don't want to because it's not upgrade-proof. Is there any way to do this without editing any core files?

Probably editing the layout XML to add a canonical tag in the header of /tag/product/list/tagId/3/?

Thanks!


Solution

  • I used a 3rd party extension to achieve this. Just search "Magento seo-friendly tag" in Google.