Whats the best way to add a canonical tag to the login page? Would I be best to add something to the head via the layout.xml

1 Answer 1


Hi you can do this by using method of addLinkRel() which is the function of head class Mage_Page_Block_Html_Head that means it reference of head

Please try this.

<reference name="head">
    <action method="addLinkRel"><rel>canonical</rel><href>/customer/account/login</href></action>

See at

  • How would you set the base url as canonical tags should be absolute paths and not relative eg Use this structure: example.com//customer/account/login Not this structure: /customer/account/login
    – Goose84
    Commented Apr 21, 2015 at 10:20

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.