Pagination Can Now Be Indicated to Google Through 'rel="next" and 'rel="prev"

If you are using pagination on web sites, blogs, blog posts, or articles, you can now (much like rel="canonical", which acts a strong hint for duplicate content,) use the HTML link elements rel="next" and rel="prev" to indicate the relationship between component URLs in a paginated series. Now, if you choose to include rel="next" and rel="prev" […]

If you are using pagination on web sites, blogs, blog posts, or articles, you can now (much like rel="canonical", which acts a strong hint for duplicate content,) use the HTML link elements rel="next" and rel="prev" to indicate the relationship between component URLs in a paginated series. Now, if you choose to include rel="next" and rel="prev" markup on the component pages within a series, the Google gets the following hints:


The relationship between component URLs in a series can now be indicated to Google through
rel="next" and rel="prev".

  • 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.

"There's an exception to the rel="prev" and rel="next" implementation: you can also offer users a view-all page. Because view-all pages are most commonly preferred by searchers, we do our best to surface this version when appropriate in results rather than a component page (component pages are more likely to surface with rel="next" and rel="prev")," explains Google.

If you don't have a view-all page or you'd like to override Google returning a view-all page, you can use rel="next" and rel="prev" as described under:

Outlining your options

Here are three options for a series:

  1. Leave whatever you have exactly as-is. Paginated content exists throughout the web and we'll continue to strive to give searchers the best result, regardless of the page's rel="next"/rel="prev" HTML markup--or lack thereof.
  2. If you have a view-all page, or are considering a view-all page, see our post on View-all in search results.
  3. Hint to Google the relationship between the component URLs of your series with rel="next" and rel="prev". This helps us more accurately index your content and serve to users the most relevant page (commonly the first page). Implementation details below.

Implementing rel="next" and rel="prev"

If you prefer option 3 (above) for your site, let's get started! Let's say you have content paginated into the URLs:

http://www.example.com/article?story=abc&page=1
http://www.example.com/article?story=abc&page=2
http://www.example.com/article?story=abc&page=3
http://www.example.com/article?story=abc&page=4

On the first page, http://www.example.com/article?story=abc&page=1, you'd include in the <head>section:

<link rel="next" href="http://www.example.com/article?story=abc&page=2/>

On the second page, http://www.example.com/article?story=abc&page=2:

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

On the third page, http://www.example.com/article?story=abc&page=3:

<link rel="prev" href="http://www.example.com/article?story="abc&page=2"" />
<link rel="next" href="http://www.example.com/article?story=abc&page=4" />

And on the last page, http://www.example.com/article?story=abc&page=4:

<link rel="prev" href="http://www.example.com/article?story=abc&page=3" />

A few points to mention:

  • The first page only contains rel="next" and no rel="prev" markup.
  • Pages two to the second-to-last page should be doubly-linked with both rel="next" and rel="prev" markup.
  • The last page only contains markup for rel="prev", not rel="next".
  • rel="next" and rel="prev" values can be either relative or absolute URLs (as allowed by the <link>tag). And, if you include a <base>link in your document, relative paths will resolve according to the base URL.
  • rel="next" and rel="prev" only need to be declared within the <head>section, not within the document <body>.
  • We allow rel="previous" as a syntactic variant of rel="prev" links.
  • rel="next" and rel="previous" on the one hand and rel="canonical" on the other constitute independent concepts. Both declarations can be included in the same page. For example, http://www.example.com/article?story=abc&page=2&sessionid=123 may contain:
    <link rel="canonical" href="http://www.example.com/article?story=abc&page=2&rdquo;/>
    <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"" />
  • rel="prev" and rel="next" act as hints to Google, not absolute directives.
  • When implemented incorrectly, such as omitting an expected rel="prev" or rel="next" designation in the series, we'll continue to index the page(s), and rely on our own heuristics to understand your content.
For more information, you can refer this Help Center article.

User testing has taught us that searchers much prefer the view-all, single-page version of content over a component page containing only a portion of the same information with arbitrary page breaks (which cause the user to click "next" and load another URL)," Google's Benjia Li & Joachim Kupke, Software Engineers, Indexing said.

"Therefore, to improve the user experience, when we detect that a content series (e.g. page-1.html, page-2.html, etc.) also contains a single-page version (e.g. page-all.html), we're now making a larger effort to return the single-page version in search results.".

"If your site has a view-all option, there's nothing you need to do; we'll work to do it on your behalf. Also, indexing properties, like links, will be consolidated from the component pages in the series to the view-all page," the Google Indexing team noted.

Google also revealed that "users dodn't prefer the view-all page with high latency (e.g., when the view-all page took a while to load, say, because it contained many images). So while a view-all page is commonly desired, as a webmaster it's important to balance this preference with the page's load time and overall user experience."

To hint more to Google how best to serve users your information:

  1. To better optimize your view-all page, you can use rel="canonical" from component pages to the single-page version; otherwise,
  2. If a view-all page doesn't provide a good user experience for your site, you can use the rel="next" and rel="prev" attributes as a strong hint for Google to identify the series of pages and still surface a component page in results.

Google's Best practices for a series of content:

  1. If your site includes view-all pages
    We aim to detect the view-all version of your content and, if available, its associated component pages. There's nothing more you need to do! However, if you'd like to make it more explicit to us, you can include rel="canonical" from your component pages to your view-all to increase the likelihood that we detect your series of pages appropriately.

    rel="canonical" can specify the superset of content (i.e. the view-all page) from the same information in a series of URLs.

    Why does this work?

    In the diagram, page-2.html of a series may specify the canonical target as page-all.html because page-all.html is a superset of page-2.html's content. When a user searches for a query term and page-all.html is selected in search results, even if the query most related to page-2.html, we know the user will still see page-2.html's relevant information within page-all.html.

    On the other hand, page-2.html shouldn't designate page-1.html as the canonical because page-2.html's content isn't included on page-1.html. It's possible that a user's search query is relevant to content on page-2.html, but if page-2.html's canonical is set to page-1.html, the user could then select page-1.html in search results and find herself in a position where she has to further navigate to a different page to arrive at the desired information. That's a poor experience for the user, a suboptimal result from us, and it could also bring poorly targeted traffic to your site.

    However, if you strongly desire your view-all page not to appear in search results: 1) make sure the component pages in the series don't include rel="canonical" to the view-all page, and 2) mark the view-all page as "noindex" using any of the standard methods.

  2. If you'd like to surface individual, component pages (or there's no view-all available)

    It may be the case that one or both of the situations below apply to your site:

    • The view-all page is undesirable as a search result (e.g., load time too high or too difficult for users to navigate).
    • Your users prefer the multi-page experience and to be directed to a component page in search results, rather than the view-all page.

    If so, you can use standard HTML rel="next" and rel="prev" elements to specify a relationship between the component pages in your series of content. If done correctly, Google will generally strive to:

    • Consolidate indexing properties, such as links, between the component pages/URLs.
    • Send users to the most relevant page/URL from the component pages. Typically, the most relevant page is the first page of your content, but our algorithms may point users to one of the component pages in the series.

It's not uncommon for webmasters to incorrectly use rel="canonical" from component pages to the first page of their series (e.g. page-2.html with rel="canonical" to page-1.html). We recommend against this implementation because the component pages don't actually contain duplicate content. Using rel="next" and rel="prev" is far more appropriate.