How do rel=”next” and rel=”prev” work?

How do rel=”next” and rel=”prev” work? © Image by boris_licina

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"/>

and

<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!

Related Inchoo Services

You made it all the way down here so you must have enjoyed this post! You may also like:

Google manually punishes bloggers with paid product reviews Toni Anicic
Toni Anicic

Google manually punishes bloggers with paid product reviews

What is schema.org and what about my rich snippets? Toni Anicic
Toni Anicic

What is schema.org and what about my rich snippets?

How to track internal site search with Google Analytics? Toni Anicic
Toni Anicic

How to track internal site search with Google Analytics?

Tell us about your project

Drop us a line. We'd love to know more about your project.