Scan all pages of a website: 14 rules of thumb
One small site with 64 real pages and the traps a full scan meets, crawled twice by the same program: once with no rules, once with the 14 below. Each rule has a reason and a proof.
The 14 rules, in the order they bite
Four come before the first request, eight while the crawl runs and two after each answer. A proof is a count from the lab run, or a source read on 12 November 2026. Where a rule has a few lines of code, they are the lab crawler’s own. Scan only a site you own or may scan.
Before the first requestRules 1 to 4
Rule 1: Read robots.txt before the first request.
- Why
- 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.[2]
- Proof
- +120 wastedIgnoring it added 120 captures of calendar and search pages that were not pages: 202 requests instead of 83.
Rule 2: Start from the sitemap, not from the home page.
- Why
- 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.[1]
- Proof
- 3 missedFollowing links only found 61 of 64 pages. The three it missed were the campaign pages that no page links to.
Rule 3: Then follow links once, for what the sitemap leaves out.
- Why
- 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
- 4 missedThe 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.
Rule 4: Print the plan before you capture anything.
- Why
- 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
- 64 vs 1,488The 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 crawlRules 5 to 12
Rule 5: Pace yourself below the rate limit, on purpose.
- Why
- 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
- 15 × 429With 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.
Rule 6: Wait for Retry-After, then retry.
- Why
- 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.[3][4]
- Proof
- 4 pages keptFour 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.
Retry loop, from the lab crawler const ra = Number(r.headers.get('retry-after')) if (R.retryAfter) await sleep(ra > 0 ? ra * 1000 + 50 : 500 * 2 ** attempt)Rule 7: Normalise every address before you compare two.
- Why
- 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
- 42 repeatsSwitched off, the crawl took 106 captures for 64 pages: 42 repeats.
Address key, from the lab crawler 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()Rule 8: Drop tracking and session parameters. Keep the others.
- Why
- 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
- 30 repeatsWith 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.
Parameters to drop, from the lab crawler const TRACKING = /^(utm_[a-z]+|ref|sessionid|fbclid|gclid)$/iRule 9: Stop paging at the first empty page.
- Why
- 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
- 57 empty pagesThe 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.
End of a list, from the lab crawler const items = found.filter((l) => new URL(l).pathname.startsWith(folder + '/')) if (items.length === 0) returnRule 10: Put a ceiling on every path shape. Calendars never end.
- Why
- 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.[5]
- Proof
- 202 vs 1,500Alone, 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.
Ceiling, from the lab crawler const n = (shapeCount.get(shape) || 0) + 1 shapeCount.set(shape, n) if (n > CEILING) returnRule 11: Key a page by its final address, after the redirects.
- Why
- 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
- 1 repeatThe 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.
Rule 12: Drop what lands on a sign-in page.
- Why
- 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
- 5 sign-in picturesThe 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 answerRules 13 and 14
Rule 13: Retry what can heal, three times at most, and never a 404.
- Why
- 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
- 4 lost / 6 extraWith 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.
Rule 14: Write every address and its answer to a file as you go.
- Why
- 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
- 30 repeatedThe 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
Every row is the same crawler with the rule in the first column off and the others on. Requests counts every HTTP request, redirects and 429s included. Captures are the pages it would send to a screenshot API, and wasted is the 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,500stopped | 1,482 | 64 of 64 | 1,418 | Calendar and search ran to the stop |
| Rules 8 and 10 both off | 8, 10 | 1,500stopped | 1,481 | 64 of 64 | 1,417 | A new session id in every link |
| Rules 9 and 10 both off | 9, 10 | 1,500stopped | 1,482 | 64 of 64 | 1,418 | Blog list page 4, 5, 6 and on |
| Naive crawl: every rule off, one request at a time | all | 1,500stopped | 1,488 | 53 of 64 | 1,435 | 11 real pages never reached |
The ceiling looks useless until it is not
On its own, switching off the ceiling changed nothing. Add one more failed rule and the run reached the 1,500 request stop: three pairs of rules did it, each with a different trap.
Missed pages cost more than extra ones
Repeats waste money you can see on a plan. A page the crawl never reached, because of a lost 503 or a missing sitemap entry, only shows when someone asks why it is not in the set.
Pacing is the rule that varies
The unpaced run drew 15 answers of 429 in 6 of 7 runs and none in the seventh, when the machine was busy: the count depends on how fast the server answers. The paced run drew none in every run.
Where CurlShot fits
CurlShot does not crawl. It renders the addresses you send, one successful render each, so the 14 rules run in your own script, before the call. A common shape is to read the sitemap, apply the rules, print the plan and its size, and then send the addresses.
On a paid plan, send them to the bulk endpoint in groups of 100. On the Free plan, send one address at a time and wait between calls: the limit is 10 requests a minute, so about 6 seconds, and 64 pages take a little over 6 minutes. The tool page for a whole site has a short script for the sitemap route, and the bulk screenshots tool takes a list you already have. Limits are in usage and limits; plans are on the pricing page.
Related reading
How it was run
On 12 November 2026. 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 on this list; the API of CurlShot, which was not called; and timing, which changes from run to run, so the seconds quoted are single runs. The Free and Starter figures were read from the pricing page and the usage-and-limits docs on 12 November 2026.
Questions people ask
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. Checked .
- [2]IETF, RFC 9309: Robots Exclusion Protocol. Checked .
- [3]IETF, RFC 9110: HTTP Semantics, section 10.2.3 Retry-After and 15.6.4 503 Service Unavailable. Checked .
- [4]IETF, RFC 6585: Additional HTTP Status Codes, section 4 429 Too Many Requests. Checked .
- [5]Google Search Central, Managing crawling of faceted navigation URLs. Checked .
Read next
- PlaybookHow to screenshot a list of URLs in bulkScreenshot hundreds or thousands of URLs: a queue simulator that says how long it takes, a short Node.js script, and what fails at scale.
- Pre-launch auditOne screenshot per template, not per pageCheck 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.
- GuideHow to screenshot a page behind a login, safelyFour 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.