Magento and rel=canonical
A new comment on my old post that explains how rel=canonical element (tag) works gave me inspiration to write another article about rel=canonical. This time, I’ll try to explain why and where rel=canonical is usually necessary in a Magento store.
I’ll leave technical implementation and decision should you use any of the existing extensions or go for custom implementation to you. I’ll just cover the marketing and SEO perspective on the issue.
First, you need to understand why are you using rel=canonical and NOT using 301 redirection. You are using rel=canonical over 301 because you have pages that should be accessible to users but feature identical content as some other page. This means you can’t implement a 301 redirect since you don’t want user to be redirected back to original but you want to tell search engines that the page they are about to index is actually a copy of another page and all of the SEO credit should go to that original page instead of spreading it evenly across copies and thus lowering original page’s ranking position in SERP.
The most critical point in Magento where rel=canonical implementation is extremely necessary is product listing on category pages. Lets have a look at such a page on a Magento demo store with sample products:
What we have here is a page with just 5 products that actually has at least 180 identical copies with different URLs by default (credits to Mladen for taking time to calculate the number of combinations). What am I talking about?
- You can sort them by Grid or by list
- You can sort them by Position, Name, Price and Contrast ratio
- You can show 9, 15 or 30 per page (although there is only 5)
- You can sort them ascending or descending
Each of these can be selected on it’s own or in combination with any or all of the possible selections and it will bring back identical content but with different URL. You can’t use 301 to redirect user back to the category page since you want user to be able to sort the products this way and if you redirect him he’ll see the old sorting again, so you have to use rel=canonical and redirect only search engines back to the original page.
The same thing applies to https vs http URLs, print pages, and basically any link that changes the visual elements but doesn’t change the content of the page.
Need help with your Magento store’s SEO? Request a quote!
Thanks it’s really helpful for me, thanks for share
how could we add canonical tag for the CMS Pages on the site?
It is possible that you would temporarily lose some of the rankings but it doesn’t really have to happen. It might even help your rankings in case keywords you rank for with product pages don’t have category name in them, since it will bring the keyword closer to the root of domain.
Anyway, you could wait for the peek of the season to end before you make drastic changes.
I’ll appreciate an advice from you.
I started work on a Magento installation with a lot of duplicated pages.
In many cases Google has indexed pages with categories like these:
I applicated canonical tag only for categories. I hesitate to apply it to products because I’m afraid to loose positions due to loss of category-keyword in the url/mess with canonical and this is the most important time of the year for the client (so not a good time for tests)
What do you think? I’m right to be afraid of drop/fall (temporary?) in the number of visits due to canonical and change of indexed url (the new ones without category keyword) ?
Sorry for bad english and long-windedness
We are using Magento Enterprise and have multiple pages of products in a category. For example, our “boys” category shows 100 per page and is 7 pages deep. We turned on canonical and realized that all 7 pages point google to page 1. Is there a way to easily change the url structure so that google sees each page as it’s own url? i.e. http://www.axlscloset.com/boys-1-clothes.html , http://www.axlscloset.com/boys-2-clothes.html ?
Our SEO has plummeted since maikng this change.
Good catch. It’s an infinite loop, Google usually decides to ignore rel canonical when this happens.
Anybody notice a bug with the Canonical tag and 301 redirects?
For example, if you have a category page URL say
for which you have already set up a 301 redirect via Magento admin because let’s say you decided to add keywords to the URL, so the new URL is
then if you turn on Canonical tags for categories, the canonical tag will be pointing to the ORIGINAL URL.
So on the page
you will have a Canonical Tag pointing to
which itself is 301 redirected to
I don’t think this is very good SEO practice….
This only happens if you have a 301 redirect, if you don’t the correct URL is pointed to by the Canonical tag.
We had to turn them off…
We have implemented the canonical tag on our store but for some reason it is duplicated and we cannot find out why ? if you go to http://www.gloopy.co.uk/console-repairs/ and click view source you will see 2
any advice would be much appreciated
Excellent post, makes perfect sense but I can’t for the life of me find where the code for the sort by links is. Would you be able to share which template file needs to be edited?
It’s a bit complicated concept.
a) I didn’t find an official Google statement explaining how exactly GWT parameter forbidding works in respect to PageRank flow (is it like robots.txt or like meta noindex or like meta noindex nofollow). Logic dictates it is not likely that it works like “meta noindex, nofollow”. It either works like “meta noindex” or like robots.txt disallow.
b) See this – https://inchoo.net/online-marketing/robots-txt-vs-meta-tag-conflicts/
You say above “Forbidding parameters works just like no-index, so you’re still leaking PageRank”, however in your other article you talk about no-follow being bad for the flow of page rank.
Could you clarify that forbidding parameters is being either; a) treated like no-index no-follow; or b) no-index is also bad for the flow of page rank?
Put a rel=canonical directive on paginated results pointing back to the top page in an attempt to flow link juice to that URL. You’ll either misdirect the engines into thinking you have only a single page of results or convince them that your directives aren’t worth following (as they find clearly unique content on those pages).
Besides, it won’t pass value to the deeper product pages
Yea, I’d make a new attribute where you can enter the canonical URL value.
What I’d like to do is:
PRODUCT A doesn’t have canonical
PRODUCT B has canonical to A
PRODUCT C has canonical to A
Probably with a new attribute called by the head.phtml?
Could you be more specific? Where do you have duplicate content that you want to eliminate? Can you give an example of 2 URLs?
How to implement a single rel=canonical for each product?
Great Post Toni!
My site switched from WordPress to Magento a couple of weeks ago and the rankings have plummeted from 15 for my main “fat head” keyword to sub 1000. I’m guessing it’s partly due to Google re-evaluating the site, and partly due to duplicate content.
At one stage over 7,000 pages were indexed, with less than 300 pages of unique content. As a result we:
1) Nofollowed the attributes (Bad Idea – will undo)
2) Installed the Yoast duplicate content extension (Good Idea)
3) “Ignored” the parameters in Webmaster Tools (Bad Idea – have removed)
The number of pages in the index has now fallen to around 5,000 so still a way to go.
@ Joachim – Any plans to update the Yoast extension so it deals with pagination in the manner you suggest here?
I don’t manage Magento directly and I understand why the canonical tags are being used to avoid dupe content. However, the imlpementation on my site targets a canonical URL that does not exist directly in the site navigation structure.
Surely that can’t be good for SEO as theres no direct link value being passed across, or any historic 3rd party link value either.
I’d welcome your thoughts.
@Toni that is an option and even an not so bad one. A more general solution is to use noindex,follow robots meta tag for page 2 and beyond.
That is one of the technical problems I’m trying to figure out a way to resolve right now.
In line with this article. The canonical element is very useful to avoid duplicate content for category pages. My experience is that the canonical element works fine if all the products fit on just one page, so there is no need for pagination. When you have pagination you should really look for another solution. Because the canonical tag points Google to the first page, you prevent the indexation of products on the second page and beyond.
I like the girls !!!! woooo???????
You’ll need a lot of PageRank to get such deep duplicated content into the main index and to show up on Google search, but it doesn’t mean Google doesn’t see it 🙂
Forbidding parameters works just like no-index, so you’re still leaking PageRank to these 180+ combinations.
What I meant with suppressing was not no-index/nofollow, but certain get params, e.g. dir, mode, order
Do you have an example of a Magento store that has that much duplicate content for a category page? I guess Google is smart enough to not index all of them.
Nick, I respectfully disagree.
Also, disabling indexing is not the best solution. If you no-index and nofollow these pages you are doing MORE HARM to your website than good. To understand what I’m talking about, read this. https://inchoo.net/ecommerce/why-relnofollow-in-ecommerce-menus-is-a-bad-idea/
The easiest approach to avoid this would probably be to suppress those via Google webmaster tools.
Yes, technical examples would be nice! 🙂
Well explained. Never thought of the combinations you explained. I was only thinking about duplicate product pages (when they added in more then one category).
A part II for this post with a technical explaination how to achieve best results would be most welcome.