How to add rel=”nofollow” to the top links in Magento

It is a good practice to add nofollow attribute to the links that are not important from SEO perspective, so link juice is not trickled down to these pages.

These links are on the top of the Magento pages:

My Account | My Wishlist | My Cart | Checkout | Log In

Here is what you have to do:

1. Open the following file:
app/design/frontend/default/[*yourTheme*]/template/page/template/links.phtml
– Replace [*yourTheme*] with whatever the name of your theme is. Replace it with ‘default’ if you are using the default theme.

2. Add rel=”nofollow” to the code on line 37

3. Test your pages


Didn't find what you were looking for? Try these links:
  • I was trying to modify the top.links.phtml file with no success until I found your article. Thanks a Bunch!

  • Youhou!! It works!
    Much eseayer than going in all the .xml file.

You can follow any responses to this entry through the RSS 2.0 feed.