How do rel=”next” and rel=”prev” work?
When dealing with online stores with a lot of products, pagination on category pages can get really problematic for search engines. Link juice gets distributed all over the place, your internal linking structure is terrible, indexing of deep page products is difficult and anchor text values that pagination sends have nothing to do with the content of the page, but there was no better way to do it. It came down to choosing between SEO and usability.
Yesterday, Google explained how they look at rel=”next” and rel=”prev” in an official blog post. It solves the great problem of paginated products on category pages of online stores.
The most important thing you need to know is that Google will treat all pages inside the pagination that have rel=”next” and rel=”prev” implemented as one unit in regards to link attribution. This means you no longer need to worry about dispersing your internal link juice to paginated pages or external link juice that’s coming into these pages. They will treat them as a whole and collect link juice from all of them, while shoving the most relevant page in the search result (most often the 1st page of the paginated unit).
I’m actually very impressed by this solution, since the best thing we could do so far was implement a rel=”canonical” which is really applicable in some rare cases I described here, but not in most of the pagination problems (since content of the page 2 is often completely different than the content of the page 1 etc.).
The technical implementation of rel=”prev” and rel=”next” is very similar to the way you implement rel=”canonical”:
It is placed in the head in this form:
<link rel="next" href="http://www.example.com/article?story=abc&page=2"/>
<link rel="prev" href="http://www.example.com/article?story=abc&page=1"/>
The first page, obviously, should not have a rel=”prev”.
UPDATE: Google made a video that explains a lot of things about rel prev and rel next:
Need help with your Magento store’s SEO? Request a quote!
You’re the man Ilan! it works like a charm! Thank you very much! 🙂
for those who visit this page through a search engine…. please continue to read on https://inchoo.net/ecommerce/magento/how-to-implement-relprev-and-relnext-to-magentos-pagination/
An excellent implementation of rel next and prev via an overide on .phtml files and an implementation using an extension.
This is a (dirty) way to implement next & prev link rel :
Put this code in your page/html/head.phtml :
(Or in your customized head.phtml)
can you actually tell us on how to implement this by code into the html head. I had one solution that was working but had some bugs, such as a rel=”next” metatag on the last page of a paginated page. That should not be the case. Would be great, if you could write a blogpost about it. Thank you so much. I love your website.
Nice information Toni. This should also avoid duplicate Title and description tag issue too as all pages will be considered as a single unit.