Magento – Adding Canonical URL for CMS Pages via Layout XML

Magento does not automatically add canonical URLs for CMS pages. Maybe they will add this feature in the future. However, if you are setting up pages and wish to add a canonical URL using the layout update xml, you can add the following code into the Custom Layout Update XML.

<reference name="head">
<action method="addLinkRel">
<rel>canonical</rel>
<href>http://www.yoururl.com/goes/here</href>
</action>
</reference>