# Scan all pages of a website: 14 rules of thumb

> 14 short rules for capturing every page of a site: sitemap, robots, rate, query strings, paging, calendars, sign-ins, retries. Each one measured.

Rules of thumb by Serghei Pogor, founder of CurlShot (https://curlshot.com/about/serghei-pogor). Published 27 November 2026. Page for people: https://curlshot.com/blog/scan-all-pages-of-a-website

To scan all pages of a website, read robots.txt, take the addresses from the sitemap, follow links once for what it leaves out, and stop every trap with a rule: drop tracking parameters, stop paging at the first empty page, cap each path shape, skip sign-in redirects, retry only what can heal. On a 64-page lab site, a crawler with the 14 rules made 83 requests and found all 64 pages; the same crawler with them off made 1,500 and found 53. CurlShot does not crawl: it renders each address you send, and each successful render counts as one screenshot.

## Key facts

- On a 64-page lab site a crawler with no rules made 1,500 requests, took 1,435 captures that were not new pages and still missed 11 real ones. With 14 rules it made 83 and found all 64.
- One trap is enough to fill the budget: session ids in links, a list that never ends or a calendar each ran to 1,500 requests once the ceiling on a path shape was off too.
- The sitemap and the links each miss something. Links alone missed 3 pages that nothing links to; the sitemap alone missed 4 that it leaves out. Use both.
- Wait for Retry-After: with it, 4 pages that answered 503 for two seconds were kept; three immediate retries lost all 4.
- CurlShot counts each successful render, repeats included unless cache=true, and does not crawl. The rules belong in the script that builds the list, so print the plan before the first call.

## What the rules changed

The same crawler ran against a stand-in site with 64 real pages on 12 November 2026. With all 14 rules it made 83 requests and found 64 of 64 pages. With every rule off, one request at a time, it made 1,500 requests (the stop), took 1,435 captures that were not a first picture of a real page, and found 53 of 64.

## The 14 rules

### Before the first request

**1. Read robots.txt before the first request.**

It is where a site lists the paths it does not want crawled, and those paths are mostly the traps: here /calendar/ and /search. Fetch it at the start of every scan; the standard lets a crawler keep a copy for 24 hours at most. It is a request, not a lock: the same standard says its rules are not a form of access authorization. Scan only sites you own or may scan.

Proof: Ignoring it added 120 captures of calendar and search pages that were not pages: 202 requests instead of 83.

**2. Start from the sitemap, not from the home page.**

The sitemap is the owner’s own list, and it reaches pages that no link reaches: campaign pages, old landing pages, orphans. The Sitemap line of robots.txt points to it. One file holds at most 50,000 addresses and 50 MB, so a large site publishes an index: read the index, then each file in it.

Proof: Following links only found 61 of 64 pages. The three it missed were the campaign pages that no page links to.

**3. Then follow links once, for what the sitemap leaves out.**

Sitemaps are written by hand or by a plugin, and both forget pages. One pass over the links of every page catches the rest. An address in the sitemap that answers 404 is a finding for the site owner, not an error in your scan.

Proof: The sitemap alone found 60 of 64 pages. It left out the terms, the privacy page and two blog list pages, and it listed 2 removed pages that answer 404.

**4. Print the plan before you capture anything.**

Capturing is the step you pay for. With CurlShot, every successful render counts as one screenshot, and a repeat counts again unless the request has cache=true. List the addresses, count them and compare the count with your plan before the first call.

Proof: The rules left a plan of 64 addresses. The crawl with no rules would have sent 1,488, which is 29.8 times the 50 screenshots a month of the Free plan (pricing page read on 20 November 2026).

### While you crawl

**5. Pace yourself below the rate limit, on purpose.**

A 429 is a request that did nothing, and on a real API it uses up your window too. Divide 60 seconds by the requests a minute of your plan and wait that long between calls: 6 seconds on the Free plan (10 a minute), 1 second on Starter (60). A bulk call counts one request per item against the same limit.

Proof: With 16 parallel workers and no pause, the lab crawl drew 15 answers of 429 in 98 requests in 6 of 7 runs; the seventh, on a busy machine, drew none. The paced crawl drew none in 83 requests, every time. The unpaced run finished sooner, because every 429 was retried. Speed was not the cost; the wasted requests were.

**6. Wait for Retry-After, then retry.**

A 429 or a 503 often says how long to wait. The header holds a number of seconds or a date, and an immediate retry meets the same answer. The answers of CurlShot carry it on 429 and 503 too.

Proof: Four lab pages answered 503 for two seconds. Waiting as told cost 4 extra requests and got all 4 pages. Three immediate retries per page made 16 answers of 503 instead of 4, which is 12 more requests, and lost all 4 pages.

```javascript
const ra = Number(r.headers.get('retry-after'))
if (R.retryAfter) await sleep(ra > 0 ? ra * 1000 + 50 : 500 * 2 ** attempt)
```

**7. Normalise every address before you compare two.**

Lower-case the host, drop the #fragment, drop a trailing slash and sort the query. Without it /docs/p-3, /docs/p-3/ and /docs/p-3#install are three pictures of one page.

Proof: Switched off, the crawl took 106 captures for 64 pages: 42 repeats.

```javascript
u.hash = ''
u.hostname = u.hostname.toLowerCase()
if (u.pathname.length > 1 && u.pathname.endsWith('/')) u.pathname = u.pathname.slice(0, -1)
u.searchParams.sort()
```

**8. Drop tracking and session parameters. Keep the others.**

utm_*, ref, fbclid, gclid and session ids do not change the page, and some sites put a new session id in every link, which makes the number of addresses endless. Keep page, id, lang and anything else that changes what is on screen: strip one of those and two pages become one.

Proof: With the parameters kept, the crawl took 30 repeats. With the ceiling of rule 10 off as well, the new session id in every link ran it to the 1,500 request stop, with 1,417 captures that were not new pages.

```javascript
const TRACKING = /^(utm_[a-z]+|ref|sessionid|fbclid|gclid)$/i
```

**9. Stop paging at the first empty page.**

A list that answers 200 for page 40 with “no posts” and a link to page 41 never ends. Stop when a page of a list holds no items, not when the next link runs out.

Proof: The lab blog has 3 real list pages. With the rule off, the crawl took 57 empty list pages before the ceiling stopped it; with the ceiling off as well it ran to the 1,500 request stop.

```javascript
const items = found.filter((l) => new URL(l).pathname.startsWith(folder + '/'))
if (items.length === 0) return
```

**10. Put a ceiling on every path shape. Calendars never end.**

A calendar has a next month for ever, and a search page links to more searches. Group addresses by their first path segment and depth, as in the article on one picture per template, and stop after a fixed number in each group. The lab uses 60, one and a half times the largest real group (40 documentation pages). Google’s guide to faceted navigation calls this an infinite URL space.

Proof: Alone, the ceiling changed nothing: 83 requests, because the other rules had closed every trap. With robots.txt ignored it was the only guard left: 202 requests with it, the 1,500 request stop without it.

```javascript
const n = (shapeCount.get(shape) || 0) + 1
shapeCount.set(shape, n)
if (n > CEILING) return
```

**11. Key a page by its final address, after the redirects.**

http to https, a moved page, a trailing slash: many addresses end at one page. Follow the redirect yourself, note where it ended and skip the page if that address is already in your list.

Proof: The lab has one old address that redirects to the pricing page. Without the rule it was captured a second time: 1 repeat. The lab has one redirect, so the number is small; count the redirects on your site before you decide it does not matter.

**12. Drop what lands on a sign-in page.**

A visitor without a session is sent from an account page to the sign-in form, so every private address becomes the same picture. Skip an address whose final path is the sign-in page, and capture the private pages on purpose, with a session, as in the article on pages behind a login.

Proof: The lab has four account and admin addresses. With rules 11 and 12 both off, the crawl took 5 pictures of the one sign-in form (4 redirects and a #main link on the form itself) and 6 captures that were not new pages in all.

### After each answer

**13. Retry what can heal, three times at most, and never a 404.**

A network error, a 429 and a 5xx pass; a 404, a 403 and a 401 do not, and each retry is a request you pay for in time. Back off between tries, and use Retry-After when it is given.

Proof: With no retries, 4 pages were lost: the ones that answered 503. Retrying everything, 404 included, made 6 extra requests on the 2 removed pages and took 26 seconds against 13.

**14. Write every address and its answer to a file as you go.**

A scan of thousands of pages gets stopped by something: a timeout, a deploy, a closed laptop. Append one line per address (address, status, final address, file name, time) and skip those lines on the restart. The file is also your report. A repeat render counts again on CurlShot, unless the request has cache=true.

Proof: The lab crawl, stopped after 30 captures, had made 34 requests. With no file, a restart repeats all 30 captures. That is a count, not a second run.

## Each rule switched off, one at a time

Every row is the same crawler with the rules in the first column off and all the others on. Requests are every HTTP request, redirects and 429s included. Captures are the pages it would send to a screenshot API. Found is real pages of 64. Wasted is captures that were not the first picture of a real page.

| Switched off | Rule | Requests | Captures | Found | Wasted | What happened |
| --- | --- | --- | --- | --- | --- | --- |
| Nothing: all 14 rules on | - | 83 | 64 | 64 of 64 | 0 | 4 answers of 503 and 2 of 404 came back as they should |
| robots.txt ignored | 1 | 202 | 184 | 64 of 64 | 120 | 60 calendar and 60 search pages |
| No sitemap, links only | 2 | 76 | 61 | 61 of 64 | 0 | Missed the 3 campaign pages |
| Sitemap only, no links | 3 | 68 | 60 | 60 of 64 | 0 | Missed the terms, the privacy page and 2 list pages |
| No pause between requests | 5 | 98 | 64 | 64 of 64 | 0 | 15 answers of 429 in 6 of 7 runs, every one retried |
| Retry-After ignored | 6 | 91 | 60 | 60 of 64 | 0 | 16 answers of 503 instead of 4; 4 pages lost |
| Addresses not normalised | 7 | 125 | 106 | 64 of 64 | 42 | Slash and #fragment variants |
| Tracking parameters kept | 8 | 113 | 94 | 64 of 64 | 30 | utm and ref variants |
| Paging with no stop | 9 | 139 | 121 | 64 of 64 | 57 | Empty list pages, up to the ceiling |
| No ceiling per path shape | 10 | 83 | 64 | 64 of 64 | 0 | No effect while every other rule holds |
| Final address not used | 11 | 83 | 65 | 64 of 64 | 1 | The old address captured as the pricing page |
| Sign-in pages not dropped | 12 | 84 | 66 | 64 of 64 | 2 | The form captured twice |
| Rules 11 and 12 both off | 11, 12 | 84 | 70 | 64 of 64 | 6 | 5 sign-in pictures and the pricing repeat |
| No retries | 13 | 79 | 60 | 60 of 64 | 0 | The 4 pages that answered 503 were lost |
| Retry on every error | 13 | 89 | 64 | 64 of 64 | 0 | 8 answers of 404 instead of 2 |
| Rules 1 and 10 both off | 1, 10 | 1,500 | 1,482 | 64 of 64 | 1,418 | Calendar and search ran to the stop (stopped at 1,500 requests) |
| Rules 8 and 10 both off | 8, 10 | 1,500 | 1,481 | 64 of 64 | 1,417 | A new session id in every link (stopped at 1,500 requests) |
| Rules 9 and 10 both off | 9, 10 | 1,500 | 1,482 | 64 of 64 | 1,418 | Blog list page 4, 5, 6 and on (stopped at 1,500 requests) |
| Naive crawl: every rule off, one request at a time | all | 1,500 | 1,488 | 53 of 64 | 1,435 | 11 real pages never reached (stopped at 1,500 requests) |

A ceiling does nothing while every other rule holds, which is why it is easy to leave out. Three of the traps (session ids, endless paging, the calendar) each filled the 1,500 requests as soon as the ceiling and the rule against that trap were both off.

## Where CurlShot fits

CurlShot does not crawl: it renders the addresses you send, one successful render each. The rules above run in your script, before the call. A common shape is to read the sitemap, apply the rules, print the plan, then send the addresses to the [bulk endpoint](https://curlshot.com/docs/bulk) in groups of 100 (paid plans), or one at a time on the Free plan at 10 requests a minute. See [pricing](https://curlshot.com/pricing) for the plans.

## How it was run

The stand-in site is a small Node server on 127.0.0.1. It has 64 real pages: a home page, pricing, about, contact, terms and privacy; 40 documentation pages; a blog list of 3 pages with 12 posts; and 3 campaign pages that no page links to. It also has the traps: every documentation page links to others with a tracking parameter, a trailing slash, a #fragment and a session id that is new in every answer; the blog list answers 200 for page 4, 5, 6 and on, with the words "No posts found" and a link to the next page; a calendar links to the next month for ever; a search page links to more searches; four account and admin addresses redirect to a sign-in form; one old address redirects to the pricing page; 4 pages answer 503 for 2 seconds after the first request; two addresses in the sitemap answer 404; and the server answers 429 with Retry-After: 1 above 40 requests a second. The robots.txt file disallows /calendar/ and /search and names the sitemap.

The crawler reads the sitemap, fetches each address with plain HTTP, follows links and decides, for each address, whether a screenshot would be requested. It counts requests and "captures", the pages it would send to a screenshot API. A real page is counted once, by an id the server puts in a header. A run stops after 1,500 requests. Each rule is one switch, so every row of the ledger is the same crawler with that one rule off.

What the run did not cover: a real site, whose traps are not all in this list; the product's API, which was not called; and timing, which varies from run to run (counts did not in the runs repeated). The 3,000 and 60 figures for the Starter plan and the 100 and 10 of the Free plan were read from the pricing page on 12 November 2026.

## Questions

### How do I scan all the pages of a website?

Read robots.txt, then the sitemap it points to, then follow the links of each page once for pages the sitemap leaves out. Drop tracking parameters, stop paging at the first empty list page, cap each path shape and skip addresses that end at a sign-in page. Print the list and its size, and only then take the pictures.

### Is a sitemap enough to find every page?

No. On the 64-page lab site the sitemap alone found 60 pages and missed 4 that it left out, while following links alone found 61 and missed 3 that nothing links to. Use the sitemap first and one pass over the links second.

### How do I avoid infinite loops such as calendars and endless paging?

Obey the Disallow lines of robots.txt, stop paging when a list page holds no items, drop session parameters, and stop after a fixed number of addresses per path shape. In the lab, each of three traps ran to the 1,500 request stop when the ceiling and the rule against it were both off.

### How fast can I scan a website?

Slower than the limit of the weakest side. Wait 60 seconds divided by your plan's requests a minute between calls: CurlShot allows 10 a minute on the Free plan and 60 on Starter (pricing page, 12 November 2026). On the site you scan, wait for Retry-After when it answers 429 or 503.

### Does CurlShot crawl a website by following links?

No. CurlShot renders the addresses you send. Reading the sitemap and following links is done by your script, which is where the rules on this page belong. A bulk call takes up to 100 addresses on the paid plans.

### Do repeat addresses count against my plan?

Yes. Every successful render counts as one screenshot, and without cache=true the same address rendered twice counts twice. Failed renders and cache hits are not counted. Normalise and dedupe the list before you send it.

### May I scan any website?

Only a site you own or have permission to scan. robots.txt is a request to crawlers, and the standard says it is not a form of access authorization, so a path it allows is not permission and a path it disallows is a path to skip.

## Sources

1. sitemaps.org, "sitemaps.org - Protocol": https://www.sitemaps.org/protocol.html (checked 12 November 2026)
2. IETF, "RFC 9309: Robots Exclusion Protocol": https://www.rfc-editor.org/rfc/rfc9309.html (checked 12 November 2026)
3. IETF, "RFC 9110: HTTP Semantics, section 10.2.3 Retry-After and 15.6.4 503 Service Unavailable": https://www.rfc-editor.org/rfc/rfc9110.html (checked 12 November 2026)
4. IETF, "RFC 6585: Additional HTTP Status Codes, section 4 429 Too Many Requests": https://www.rfc-editor.org/rfc/rfc6585.html (checked 12 November 2026)
5. Google Search Central, "Managing crawling of faceted navigation URLs": https://developers.google.com/search/docs/crawling-indexing/crawling-managing-faceted-navigation (checked 12 November 2026)

## Go deeper

- [Screenshot all pages of a website](https://curlshot.com/tools/screenshot-all-pages-of-a-website)
- [Bulk screenshots](https://curlshot.com/tools/bulk-screenshots)
- [Bulk screenshots docs](https://curlshot.com/docs/bulk)
- [Usage and limits](https://curlshot.com/docs/usage-and-limits)
- [Pricing](https://curlshot.com/pricing)

## Read next

- [How to screenshot a list of URLs in bulk](https://curlshot.com/blog/bulk-screenshots-list-of-urls.md): Screenshot hundreds or thousands of URLs: a queue simulator that says how long it takes, a short Node.js script, and what fails at scale.
- [One screenshot per template, not per page](https://curlshot.com/blog/screenshot-one-page-per-template.md): Check a site before launch with a few pictures, not thousands. Five real sitemaps grouped by page template, a sampler to paste yours into, and an audit sheet.
- [How to screenshot a page behind a login, safely](https://curlshot.com/blog/screenshot-pages-behind-login.md): Four ways to screenshot a page that needs a login: session cookie, bearer token, Basic auth or a signed link. What each one risks, and the safest pattern.
