Google Product Forums

Re: Questions about pagination, rel="next" and rel="prev", or view-all in search results?


Maile Ohye Sep 20, 2011 8:43 AM
Posted in group: Webmaster Central

Categories: Crawling, indexing & ranking :

Hello webmasters, thanks for your great questions!

@Emanuele, @anthonydnelson, @kees-van-dieren: @poooook is correct that for Google indexing of paginated content, rel="next" and rel="prev" declarations belong in the <head> section, not in the <body> as anchor links. As an example, the second page of a series may show this:

<head>
<link rel="prev" href="http://www.example.com/article?story=abc&page=1" />
<link rel="next" href="http://www.example.com/article?story=abc&page=3" />
<title>My article, page 2</title>
</head>

rel="next" and rel="prev" values specified in the <body> section will be ignored with regard to pagination.

@milkiwayV12: Because we consider rel="next" and rel="prev" as an independent concept from rel="canonical", you can still include a rel="canonical" value on your pages (or you can also choose to omit it). For example, for the URL:
http://www.example.com/article?story=abc&page=2

I might include:
<head>
<link rel="prev" href="http://www.example.com/article?story=abc&page=1" />
<link rel="next" href="http://www.example.com/article?story=abc&page=3" />
<title>My article, page 2</title>
</head>

If the above URL also existed with a session ID:
http://www.example.com/article?story=abc&page=2&sessionid=123
because it’s a duplicate, I could include rel="canonical" to the URL without the session ID, as well as rel="next" and rel="prev" values that include the session ID:

<head>
<link rel="canonical" href="http://www.example.com/article?story=abc&page=2” />
<link rel="prev" href="http://www.example.com/article?story=abc&page=1&sessionid=123" />
<link rel="next" href="http://www.example.com/article?story=abc&page=3&sessionid=123" />
<title>My article, page 2</title>
</head>

@poooook/John: We recommend no more than one value for rel="next" and no more than one value for rel="prev". The meaning of next/prev is “the *immediately* following/preceding page.” Therefore, page 2 should not mark all pages 3, 4, 5, etc., as "next" pages, but only page 3.

@Stecki: rel="canonical" and rel="next"/"prev" aren't mutually exclusive, they're independent concepts.

With our rel="next" and rel="prev" pagination announcement, paginated component URLs (pages that are part of a series) can either:
1. Include rel="next" and rel="prev" values in the <head> of their page
2. Not include rel="next" and rel="prev" values in the <head> of their page

Separate from this announcement, each of these component URLs can still:
1. Not specify a canonical value
2. Specify the canonical value as the view-all page
3. Specify the canonical value as a similar URL, but say, one without extraneous parameters such as session ID

@cswere: It's fine if your paginated content works like Google Image Search results where pagination doesn't create a new URL (so there's no way you can add rel="next"/"prev"), but instead dynamically loads content. However, you may want to make sure that Googlebot and users without JavaScript can still easily discover your content.

@Rob Fico: Yes, you can specify rel="next" and rel="prev" values on individual components/URLs of a brand or category on an e-commerce site.

@BrodyDodes: When you implement rel="next" and rel="prev" on component pages of a series, we'll then consolidate the indexing properties from the component pages and attempt to direct  users to the most relevant page/URL. This is typically the first page. There's no need to mark page 2 to n of the series as noindex unless you're sure that you don't want those pages to appear in search results.

@TheDonald, @jerenel: If you've marked page 2 to n of your paginated series as "noindex, follow" to keep low quality content from affecting users and/or your site's rankings, that's fine, you can additionally include rel="next" and rel="prev." Noindex and rel="next"/"prev" are entirely independent annotations.

This means that if you add rel="next" and rel="prev" to noindex'd pages, it still signals to Google that the noindex'd pages are components of the series (though the noindex'd pages will not be returned in search results). This configuration is totally possible (and we'll honor it), but the benefit is mostly theoretical.

If you believe the user experience on page 2 to n provides little value -- so much so that you've already marked these pages as noindex -- then to ensure that these low-quality pages aren't returned to users and/or considered in ranking updates such as Panda, even if you choose to add rel="next" and rel="prev," you may want to consider keeping the noindex (or "noindex, follow").

@iberoAmericaMedia, @TiggerFish: Is your site’s existing use of rel="next" and rel="prev" located within the <body> section of the page? For the feature described in our blog post, Google indexing looks at rel="next" and rel="prev" within the <head> section. So you don't need to remove your existing rel="next" and rel="prev" tags if they’re found in the <body> -- those will continue to be treated the same way as prior to our rel="next" and rel="prev" pagination announcement on September 15, 2011, and we will not consolidate their indexing properties.

For rel=”next” and rel=”prev” markup that isn’t intended to work with Google indexing, we’ll develop more heuristics over time to understand which attributions to trust.

@thericker: Ah yes, SMX Advanced... Thanks for following our updates!

@debdulaldey: It's always best to have a unique title and meta description for each page. Ideally, the title and description are descriptive of the page's content. For example:

http://www.example.com/article?story=abc&page=1
<title>rel="next" and rel="prev": Background on pagination</title>

http://www.example.com/article?story=abc&page=2
<title>rel="next" and rel="prev": Sample cases</title>

http://www.example.com/article?story=abc&page=2
<title>rel="next" and rel="prev": FAQs</title>

If that descriptive a title isn't possible, you could also have something like:

http://www.example.com/product?category=abc&page=1
<title>Google t-shirts</title>

http://www.example.com/product?category=abc&page=2
<title>Google t-shirts, page 2</title>
or
<title>Google t-shirts (items 10-20)</title>

Take care,
Maile