Magento, SEO

Magento Canonical Meta Tag on CMS Pages

Magento is a powerful ecommerce platform that has a built in CMS for creating structural, static pages. If enabled in your sites configuration, canonical meta tags can be automatically generated which is great, however for static CMS pages they are not. This means that if you are serious about your SEO, you need to manually add these to your CMS pages. You can simply add the canonical URL meta tags with the following steps via XML updates on each page via Magento’s admin area.

How to Add Canonical URL Tags in Magento CMS

To add the canonical link to a Magento CMS page, simply follow the steps below:

1) Login to your Magento admin panel.

2) Hover over the ‘CMS’ link on the main admin panel navigation to display the sub navigation, then click on the ‘pages’ link.

3) The list of static, CMS generated pages will be displayed, simply click on the page that you wish to add a canonical tag to, this will open the page editor.

4) Now click on the ‘design’ link on the left hand navigation. The first section should be labelled ‘page layout’ and within this section will be the text field labelled ‘layout update XML’.

5) Simply paste the following code into the ‘layout update XML’ text area, updating the URL to the relevant pages, full URL (replace:http://www.yoururl.com/goes/here.html with your URL).

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

6) Now click the ‘save page’ button and check the page source of the URL that you have just added a canonnical link to (not the admin page, but the actual page that you have updated: http://www.yoururl.com/goes/here.html).


3 Responses

  1. Adi B
    February 23, 2013

    Great post, I had the dynamically generated category / product pages automatically having their cannonical tags being generated but wondered where it was on CMS pages. Thanks for the help.

    Reply
  2. ravi
    September 26, 2017

    Above code is not working for my website’s CMS page (About us, Career, contact us and more). Currently using magento 2. Please help

    Reply
    • Mathew
      October 27, 2017

      There could be numerous reason for your error, I would advise checking your error logs to identify why you are receiving any errors. Also this is a specific fix encountered on Magento v1.X installations.

      Reply

Leave a Reply