Pagination · Pagination

Pagination loop

This page and its partner name each other as both the next and the previous page, so following the series goes round in a circle.

How this page is built

This page has a rel=prev and a rel=next link, and both point at the pagination loop partner page. The partner points back here in the same way, so the series is two pages long and has no start or end.

Why it matters

A paginated series should run in a straight line from the first page to the last. When a next link points back to a page earlier in the series, crawlers following the sequence go round in a loop. They waste crawl effort and may never reach the end of the series.

Loops usually come from a bug in the code that works out the page number. The last page points back to the first, or the page number wraps round when it passes the total.

How to check it

Follow the rel=next links from the first page and note each URL. If one repeats, the series loops. Crawl tools report pagination loops in their pagination checks.

Here, this page names its partner as both next and previous, and the partner does the same in return.

How to fix it

Leave out the next link on the last page and the previous link on the first page. Check the code that builds the page numbers at both ends of the series, and test it with series of one, two and many pages.

Back to all tests