By now, we should all be aware of the canonical tag and how it gets used to help prevent duplicate content issues. For example, you might have URLs like this:
The canonical tag would read something like this:
<link rel="canonical" href="http://domain.com/article-name" />
Let’s say you had a site selling various kinds of widgets. Your initial widget category page URLs might look something like this:
In an effort to avoid the appearance of duplicate content on the subsequent results pages, many webmasters have placed this tag on the “page=n” results pages:
<link rel="canonical" href="http://domain.com/widgets" />
The idea here is that Page data would be consolidated back to the core category page via the canonical tag.
In September Google announced they would acknowledge the rel=”next” and rel=”prev” HTML link elements to show that content spread across multiple pages is related. We can illustrate how it works with our example from above
- <link rel="next" href="http://domain.com/widgets?page=2" />
- Rel=”prev” is not applicable
- <link rel="prev" href="http://domain.com/widgets" />
- <link rel="next" href="http://domain.com/widgets?page=3" />
What does this then do for Google? According to Google:
“Now, if you choose to include rel=”next” and rel=”prev” markup on the component pages within a series, you’re giving Google a strong hint that you’d like us to:
- Consolidate indexing properties, such as links, from the component pages/URLs to the series as a whole (i.e., links should not remain dispersed between page-1.html, page-2.html, etc., but be grouped with the sequence).
- Send users to the most relevant page/URL—typically the first page of the series.”
This sounds an awful lot like what we wanted the canonical tag to accomplish, doesn’t it? Should we then remove the canonical tag and just go with the rel=prev/next attributes? The answer lies in the flaw with the initial implementation of the canonical tag. The canonical tag shouldn’t have been pointed to the main category page. Here is my recommended implementation for all three tags:
Example URL: http://domain.com/widgets?page=2
- <link rel="canonical" href="http://domain.com/widgets?page=2" />
- <link rel="prev" href=”http://domain.com/widgets" />
- <link rel="next" href="http://domain.com/widgets ?page=3" />
Why does this work?
- The rel=prev/next tags consolidate all the content and indexing information across the results pages back to the main category page.
- The canonical tag then handles any duplicate content issues that may arise from things like table-sorting links, session IDs or other tracking parameters a webmaster may want to add in the future.
I’d love to hear from you webmasters out there. Is this how you’re using these tags? Let’s hear your story!