# Check dynamic pagination

- Check 08.12 · JavaScript and HTML rendering · Critical
- Source: https://checklist-seo-geo.com/en/javascript-html-rendering/check-dynamic-pagination
- Test the “Load more” button, infinite scroll and JavaScript listings: HTML links, unique URLs, Google rendering and pages that work without scripts.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/javascript-html-rendering/check-dynamic-pagination.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

Dynamic pagination loads the rest of a list with JavaScript: a “Load more” button, infinite scroll, page changes without a reload, client-side filters and sorting. It is compatible with SEO if each batch also exists as a standalone page, at a unique URL, connected to the others by real HTML links. This check consists of testing these conditions one by one and fixing implementations that keep the position only in the browser's memory.

## Why it matters

Google puts it bluntly: its crawlers do not click buttons and generally do not trigger JavaScript functions that require a user action. They do not scroll the page either. Any item that only appears after a click on “Load more” or after scrolling remains invisible, unless it can be reached another way: links to the following pages, a sitemap or a Merchant Center feed.

Google also ignores URL fragments: to Google, `/blog#page=3` is the same URL as `/blog`. Pagination that only changes the fragment, or that changes nothing at all in the URL, offers no page 3 to crawl.

The consequences: older products or articles never discovered, deep pages deprived of internal links, and lists that AI crawlers, which read the HTML without executing JavaScript, reduce to the first batch.

The principles of pagination itself (self-referencing canonical, page 1 without a parameter, `noindex` or not) are detailed in [control pagination and infinite scroll](https://checklist-seo-geo.com/en/architecture-navigation/control-pagination-infinite-scroll). This guide covers checking how they are implemented in JavaScript.

## What it improves

- **Discovery**: every item in the list can be reached through links, not just the first batch.
- **Indexing of deep pages**: older product pages and articles receive crawlable internal links.
- **Sharing and returning**: one URL per batch lets visitors reload, share or bookmark the position they reached.
- **Crawlers without JavaScript**: the following pages exist for them too.
- **Rankings**: no direct effect; the effect comes through discovery and internal linking.

## How to check

Run these tests on each type of list (blog, category, product search, archive) and record the result in a table.

**1. Links in the initial HTML**

```bash
curl -s https://example.com/blog/ | grep -o -E 'href="[^"]*page[=/][0-9]+[^"]*"' | sort -u
```

Compliant result: at least one link to page 2. No result means the rest of the list is only accessible through JavaScript.

**2. Page 2 loaded directly**

```bash
curl -s -o /dev/null -w "%{http_code}\n" "https://example.com/blog/?page=2"
curl -s "https://example.com/blog/?page=2" | grep -o '<h2[^>]*>[^<]*' | head -n 3
```

Expected: `200`, and items that differ from those on page 1. A page 2 that displays page 1 reveals a parameter read only by JavaScript.

**3. Out-of-range page**: `?page=999` must return `404`, not an empty list with a `200`.

**4. URL during navigation**: click “Load more” or scroll, and watch the address bar. It must change to `?page=2`, `?page=3`. Reload: you must get the matching batch back.

**5. Without JavaScript**: disable it in the developer tools (Command Menu with `Ctrl+Shift+P` or `Cmd+Shift+P`, “Disable JavaScript”) and reload. The pagination links must remain clickable.

**6. With Google**: inspect the URL of page 2 with [URL Inspection](https://search.google.com/search-console?action=inspect), “Test live URL”. The tested page's HTML must contain the items of batch 2.

**7. With a crawl**: Screaming Frog in text-only mode (JavaScript rendering disabled) must discover the paginated URLs and the item pages of the last batches. Compare the number of item pages found with the number in the sitemap.

Example record:

| List | Page 2 link in the HTML | Direct `?page=2` | Out of range | URL updated | Without JS | Verdict |
|---|---|---|---|---|---|---|
| `/blog/` | Yes | 200, batch 2 | 404 | Yes | Yes | Compliant |
| `/boutique/theieres/` | No (button) | 200, batch 1 | 200, empty | No | No | To fix |
| `/recherche?q=fonte` | No | Not applicable | Not applicable | No | No | Acceptable if internal search is not meant to be indexed |

## How to implement

### Before you start

| Symptom | Likely cause | Fix |
|---|---|---|
| No link to page 2 in the HTML | `<button>` or `<div onclick>` | Replace with `<a href="?page=2">` intercepted by JavaScript |
| `?page=2` displays batch 1 | Current page kept in the component's state | Read the page from the URL, on the server side |
| URL unchanged while scrolling | No call to the History API | `history.pushState` or `replaceState` for each batch |
| URL in `#page=2` | Fragment-based routing | Query parameter or path (`?page=2`, `/page/2/`) |
| Out of range returns 200 | Empty template served without a check | 404 beyond the last page |

### “Load more” button

The button becomes a link to the next page, which JavaScript intercepts. Without a script, or for a crawler, it is an ordinary link:

```html
<a href="/boutique/theieres/?page=3" data-load-more>Show more teapots</a>
```

The complete interception code (fetching the next page, appending the items, updating the URL) is in the [control pagination and infinite scroll](https://checklist-seo-geo.com/en/architecture-navigation/control-pagination-infinite-scroll) guide. See also [avoid links that rely solely on JS events](https://checklist-seo-geo.com/en/javascript-html-rendering/avoid-links-that-rely-solely-js-events).

### Infinite scroll

Google recommends giving each batch a persistent, unique URL, always showing the same content there, linking the URLs to one another, and updating the displayed URL with the History API when a batch becomes the main content. For the update, observe the first item of each batch:

```js
const observer = new IntersectionObserver((entries) => {
  entries
    .filter((entry) => entry.isIntersecting)
    .forEach((entry) => history.replaceState(null, '', entry.target.dataset.pageUrl));
}, { rootMargin: '-50% 0px -50% 0px' });

document.querySelectorAll('[data-page-url]').forEach((element) => observer.observe(element));
```

The first item of each batch carries `data-page-url="/blog/?page=3"`. Keep classic pagination below the list, in the initial HTML: that is what crawlers follow.

### Next.js

Versions: Next.js 15 and 16 (App Router).

Read the page from `searchParams` on the server side (a promise to `await` since Next.js 15) and produce links with `<Link>`. The reference code is in [control pagination and infinite scroll](https://checklist-seo-geo.com/en/architecture-navigation/control-pagination-infinite-scroll). The classic trap is a client component that keeps the page in local state:

```tsx
// Avoid: page 2 has no URL
const [page, setPage] = useState(1);
<button onClick={() => setPage(page + 1)}>Next</button>
```

Replace it with a link that changes the URL; the server component reads `searchParams` again:

```tsx
<Link href={`/blog?page=${page + 1}`} scroll={false}>Next</Link>
```

For client-side infinite scroll, the first batch and the pagination links are still rendered by the server component; the client component only appends the following batches and updates the URL.

### Nuxt

Versions: Nuxt 3.x and 4.

Make the request depend on the URL, not on a local variable:

```html
<script setup>
const route = useRoute();
const page = computed(() => Number(route.query.page ?? 1));
const { data } = await useFetch('/api/posts', { query: { page } });

if (data.value && page.value > data.value.totalPages) {
  throw createError({ status: 404, statusText: 'Page not found' });
}
</script>

<template>
  <template v-if="data">
    <ul>
      <li v-for="post in data.posts" :key="post.slug">
        <NuxtLink :to="`/blog/${post.slug}`">{{ post.title }}</NuxtLink>
      </li>
    </ul>
    <NuxtLink v-if="page < data.totalPages" :to="{ query: { page: page + 1 } }">Next page</NuxtLink>
  </template>
</template>
```

`useFetch` reruns the request when `page` changes, and `<NuxtLink>` produces a real `<a href="?page=2">` link. In `createError`, `status` and `statusText` replace `statusCode` and `statusMessage`, which are still accepted but deprecated in Nuxt 4 and in the latest versions of Nuxt 3.

### Laravel

Versions: Laravel 11 to 13; Livewire 3 and 4; Inertia 2 and 3.

`paginate()` and `{{ $posts->links() }}` produce HTML links. With Livewire, the `WithPagination` trait syncs the page with `?page=n`, but check the HTML of the pagination views: if the page numbers there are `<button wire:click>` elements, publish the views (`php artisan livewire:publish --pagination`) and use links:

```blade
<a href="{{ $paginator->nextPageUrl() }}" wire:click.prevent="nextPage('{{ $paginator->getPageName() }}')">
    Next page
</a>
```

With Inertia, the `<Link>` component produces `<a href>` links: keep the page in the URL and read it in the controller.

### WordPress

Versions: WordPress 6.4 and later (verified up to 7.1).

Native pagination (`/page/2/`) is rendered in PHP. The Query Loop block can load the next page without a full reload: in WordPress 7, this is the “Reload full page” setting in the block's Advanced panel, enabled by default; once it is disabled, only the posts in the loop are replaced. In WordPress 6.4, the same feature was called “Enhanced pagination”. Check with curl that the pagination links remain in the HTML. For “Load more” or infinite scroll themes and plugins, run tests 1 to 4: many keep the `/page/n/` links hidden, others remove them. In that case, disable the feature on important archives or switch plugins.

### Shopify

Versions: Shopify, all plans, Online Store 2.0 themes, November 2026.

The Liquid `paginate` tag produces `?page=2` links on the server side. Themes and filter apps that add infinite scroll or a “Load more” button must keep these links in the HTML: check this on a collection with more than one page, then check that `?page=2` loaded directly really displays the second batch.

### Lists powered by a search engine

Lists built on the client side with Algolia, Meilisearch or Elasticsearch often have neither initial HTML nor a URL per page. With InstantSearch, the `routing` option syncs the search, filters and page with the URL, which only partly solves tests 4 and 5: the content is still produced by JavaScript. For categories that must be indexed, render the first page and the pagination links on the server side, with InstantSearch's server-side rendering or a request made by your back end.

## Common mistakes

- **Removing classic pagination from the HTML when infinite scroll is active**: crawlers no longer have any path to the following batches.
- **Updating the URL without the server knowing how to serve it**: `?page=3` reloaded directly displays batch 1.
- **Using `pushState` for every batch while scrolling**: the history fills up and the Back button becomes a nuisance. `replaceState` is enough while scrolling.
- **Overlap between batches**: the batch loaded by JavaScript does not match the `?page=n` page served by the server, with items repeated or skipped.
- **Empty list returning 200 beyond the last page**: it creates infinite URLs and soft 404s.
- **Testing only in the browser**: the list looks complete because you scrolled.

## Frequently asked questions

### Does Google click the “Load more” button?

No. Google states that its crawlers do not click buttons and generally do not trigger JavaScript functions that require a user action. It does not scroll the page either. For the following items to be discovered, the button must be a real link to a URL such as ?page=2 that displays the next batch when loaded directly, or the items must be reachable through a sitemap or a feed.

### Is infinite scroll compatible with SEO?

Infinite scroll is compatible with SEO if each batch also exists as a standalone page: a unique, persistent URL, identical content on every load, HTML links between the pages, and a URL updated with the History API while scrolling. Without these underlying pages, Google only sees the first batch, and neither do crawlers that do not execute JavaScript see anything more.

### Does #page=2 pagination work for Google?

No, #page=2 pagination does not work for Google, which ignores URL fragments: to Google, /blog#page=2 is the same address as /blog, and the link is likely to be ignored. Use a query parameter such as ?page=2 or a path such as /page/2/, which the server can serve directly, and update the URL with the History API rather than with the fragment.

### Should I still add rel="next" and rel="prev"?

Google no longer uses rel="next" and rel="prev" to understand pagination, but notes that other search engines may still use them. These tags are therefore optional and harmless. What matters to Google are real <a href> links between pages, a unique URL per page and a canonical specific to each page, not a canonical pointing to the first one.

## Resources

- [Google Search Central: Pagination, incremental page loading, and their impact on Google Search](https://developers.google.com/search/docs/specialty/ecommerce/pagination-and-incremental-page-loading?hl=en)
- [Google Search Central: Fix lazy-loaded content](https://developers.google.com/search/docs/crawling-indexing/javascript/lazy-loading?hl=en)
- [MDN: History.replaceState()](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState)
- [MDN: Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
- [Chrome for Developers: Disable JavaScript](https://developer.chrome.com/docs/devtools/javascript/disable)
- [Livewire: Pagination](https://livewire.laravel.com/docs/pagination)

Next steps: [check SPA HTTP status codes](https://checklist-seo-geo.com/en/javascript-html-rendering/check-spa-http-status-codes) and [avoid infinite URL spaces](https://checklist-seo-geo.com/en/architecture-navigation/avoid-infinite-url-spaces).
