[null,null,[],[[["\u003cp\u003e\u003ccode\u003erel="next"\u003c/code\u003e and \u003ccode\u003erel="prev"\u003c/code\u003e are HTML attributes used to indicate the relationship between component URLs in a paginated series, such as articles, product categories, or forum threads.\u003c/p\u003e\n"],["\u003cp\u003eThese attributes help Google consolidate indexing properties and direct users to the most relevant page, usually the first page of the series.\u003c/p\u003e\n"],["\u003cp\u003eWhile \u003ccode\u003erel="next"\u003c/code\u003e and \u003ccode\u003erel="prev"\u003c/code\u003e provide strong hints, they are not absolute directives and Google's algorithms might still utilize heuristics for content understanding.\u003c/p\u003e\n"],["\u003cp\u003eFor paginated content with a "view-all" page, refer to the View-all in search results guide as Google prioritizes surfacing these pages in search results.\u003c/p\u003e\n"],["\u003cp\u003eImplementation involves adding \u003ccode\u003e<link rel="next" href="..."/>\u003c/code\u003e and \u003ccode\u003e<link rel="prev" href="..."/>\u003c/code\u003e tags in the \u003ccode\u003e<head>\u003c/code\u003e section of your HTML, ensuring correct linking between pages in the series.\u003c/p\u003e\n"]]],["`rel=\"next\"` and `rel=\"prev\"` HTML link elements indicate relationships between paginated URLs. Implement these to consolidate indexing properties to the entire series and direct users to the most relevant page, typically the first. Pages within a series should link to the next and previous pages, except the first (only `next`) and last (only `prev`). These tags are hints, not commands, and incorrect use will not prevent indexing. Alternatively, a \"view-all\" page is preferred by searchers.\n"],null,["# Pagination with rel=\"next\" and rel=\"prev\"\n\nThursday, September 15, 2011\n| It's been a while since we published this blog post. Some of the information may be outdated (for example, some images may be missing, and some links may not work anymore). `rel=prev/next` is not an indexing signal anymore. Check out our up-to-date [guide to pagination](/search/docs/specialty/ecommerce/pagination-and-incremental-page-loading).\n\n\nMuch like [`rel=\"canonical\"`](/search/blog/2009/02/specify-your-canonical)\nacts a strong hint for duplicate content, you can now use the HTML link elements\n[`rel=\"next\"` and `rel=\"prev\"`](https://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#sequential-link-types)\nto indicate the relationship between component URLs in a paginated series. Throughout the web, a\npaginated series of content may take many shapes---it can be an article divided into several\ncomponent pages, or a product category with items spread across several pages, or a forum thread\ndivided into a sequence of URLs. Now, if you choose to include `rel=\"next\"` and\n`rel=\"prev\"` markup on the component pages within a series, you're giving Google a\nstrong hint that you'd like us to:\n\n- Consolidate indexing properties, such as links, from the component pages/URLs to the series as a whole (that is, links should not remain dispersed between `page-1.html`, `page-2.html`, etc., but be grouped with the sequence).\n- Send users to the most relevant page/URL---typically the first page of the series.\n\nThe relationship between component URLs in a series can now be indicated to Google through `rel=\"next\"` and `rel=\"prev\"`.\n\n\nThere's an exception to the `rel=\"prev\"` and `rel=\"next\"` implementation:\nIf, alongside your series of content, you also offer users a view-all page, or if you're\nconsidering a view-all page, please see our post on\n[View-all in search results](/search/blog/2011/09/view-all-in-search-results) for more\ninformation. Because view-all pages are most commonly preferred by searchers, we do our best to\nsurface this version when appropriate in results rather than a component page (component pages are\nmore likely to surface with `rel=\"next\"` and `rel=\"prev\"`).\n\n\nIf you don't have a view-all page or you'd like to override Google returning a view-all page, you\ncan use `rel=\"next\"` and `rel=\"prev\"` as described in this post.\nFor information on paginated configurations that include a view-all page, please see our post on [View-all in search results](/search/blog/2011/09/view-all-in-search-results).\n\nOutlining your options\n----------------------\n\n\nHere are three options for a series:\n\n1. 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.\n2. If you have a view-all page, or are considering a view-all page, see our post on [View-all in search results](/search/blog/2011/09/view-all-in-search-results).\n3. 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.\n\nImplementing `rel=\"next\"` and `rel=\"prev\"`\n------------------------------------------\n\n\nIf you prefer option 3 (above) for your site, let's get started! Let's say you have content\npaginated into the URLs: \n\n```\nhttps://www.example.com/article?story=abc&page=1\nhttps://www.example.com/article?story=abc&page=2\nhttps://www.example.com/article?story=abc&page=3\nhttps://www.example.com/article?story=abc&page=4\n```\n\n\nOn the first page, `https://www.example.com/article?story=abc&page=1`, you'd include\nin the `\u003chead\u003e` section: \n\n```\n\u003clink rel=\"next\" href=\"https://www.example.com/article?story=abc&page=2\" /\u003e\n```\n\n\nOn the second page, `https://www.example.com/article?story=abc&page=2`: \n\n```\n\u003clink rel=\"prev\" href=\"https://www.example.com/article?story=abc&page=1\" /\u003e\n\u003clink rel=\"next\" href=\"https://www.example.com/article?story=abc&page=3\" /\u003e\n```\n\n\nOn the third page, `https://www.example.com/article?story=abc&page=3`: \n\n```\n\u003clink rel=\"prev\" href=\"https://www.example.com/article?story=abc&page=2\" /\u003e\n\u003clink rel=\"next\" href=\"https://www.example.com/article?story=abc&page=4\" /\u003e\n```\n\n\nAnd on the last page, `https://www.example.com/article?story=abc&page=4`: \n\n```\n\u003clink rel=\"prev\" href=\"https://www.example.com/article?story=abc&page=3\" /\u003e\n```\n\nA few points to mention:\n\n- The first page only contains `rel=\"next\"` and no `rel=\"prev\"` markup.\n- Pages two to the second-to-last page should be doubly-linked with both `rel=\"next\"` and `rel=\"prev\"` markup.\n- The last page only contains markup for `rel=\"prev\"`, not `rel=\"next\"`.\n- `rel=\"next\"` and `rel=\"prev\"` values can be either relative or absolute URLs (as allowed by the `\u003clink /\u003e` tag). And, if you include a `\u003cbase/\u003e` link in your document, relative paths will resolve according to the base URL.\n- `rel=\"next\"` and `rel=\"prev\"` only need to be declared within the `\u003chead\u003e` section, not within the document `\u003cbody\u003e`.\n- We allow `rel=\"previous\"` as a syntactic variant of `rel=\"prev\"` links.\n- `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, `https://www.example.com/article?story=abc&page=2&sessionid=123` may contain: \n\n ```\n \u003clink rel=\"canonical\" href=\"https://www.example.com/article?story=abc&page=2\" /\u003e\n \u003clink rel=\"prev\" href=\"https://www.example.com/article?story=abc&page=1&sessionid=123\" /\u003e\n \u003clink rel=\"next\" href=\"https://www.example.com/article?story=abc&page=3&sessionid=123\" /\u003e\n ```\n- `rel=\"prev\"` and `rel=\"next\"` act as hints to Google, not absolute commands.\n- 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.\n\n\nMore information can be found in our\n[Help Center](https://support.google.com/webmasters), or join the\nconversation in our\n[Webmaster Help Forum](https://support.google.com/webmasters/community)!\n\n\nWritten by Benjia Li and Joachim Kupke, Software Engineers, Indexing Team"]]