Skip to content
Back to glossary

Pagination definition

Pagination is splitting a long list of content, such as blog posts, products or search results, into separate pages that visitors move between with numbered links or next and previous buttons. APIs use pagination too, returning large result sets one chunk at a time.

Pagination splits a long collection into pages of a fixed size: twenty blog posts per page, or fifty products. Visitors move between pages with numbered links, previous and next buttons, or both. Each page normally has its own URL, such as /blog?page=2 or /blog/page/2.

In print, pagination means numbering the pages of a document. On the web it almost always means the navigation pattern.

What are the types of pagination?

  • Numbered pages. Links to page 1, 2, 3 and onwards, often with previous and next. Readers can jump ahead and come back to a specific page later, and every page has a stable URL.
  • Load more button. The next batch appears below the current one when the visitor clicks. People stay on one page, but returning to a particular spot gets harder.
  • Infinite scroll. New items load automatically as the visitor nears the bottom. It suits feeds and works badly on any page with a footer people need to reach.

For a company blog or a case study archive, numbered pages are the safer default. The URLs are crawlable, and nobody has to scroll past forty posts to find the contact details in the footer.

How does pagination affect SEO?

Google used to read rel=prev and rel=next link attributes to understand a paginated series. In 2019 it announced it had stopped using them for indexing years earlier. Adding them does no harm, but Google works from ordinary links between the pages. Its current guidance comes down to four rules:

  • Link each page to the next one with a regular a href link so crawlers can follow the sequence.
  • Give every page its own canonical URL. If page 3 declares page 1 as its canonical, Google treats it as a duplicate and may never find the items listed on it.
  • Put the page number in the path or a query parameter. Google ignores URL fragments, so #page=2 looks like the same page as page 1.
  • With infinite scroll or a load more button, also provide paginated URLs that work on their own. Googlebot doesn't scroll or click buttons to load more content.

How do you make pagination accessible?

Wrap the links in a nav element with an aria-label such as Pagination, so screen reader users can find and skip it. Mark the current page with aria-current=page instead of only giving it a different colour, and make sure previous and next have text labels, even if they look like arrows.

What is API pagination?

An API that returned every order in a large shop in one response would be slow and heavy, so it returns one page and tells the client how to ask for the next. Offset pagination uses parameters like limit=50&offset=100. It's simple, but large offsets get slow and results shift if items are added between requests. Cursor pagination returns a token that points at the last item, and the client sends it back to get the next batch. That holds up better on large or fast-changing data.

Headless CMSs work the same way. In Sanity, GROQ slices such as [0...20] are fine for the first pages, but the documentation recommends filtering on the last _id you saw once you go deep into a large dataset.