
crawlreplay
A command-line tool for testing robots.txt changes and new deployments against URLs found in your server logs. It helps you catch newly blocked pages, broken responses and unexpected indexing changes before putting those changes live.
About crawlreplay
When checking a new version of a site, you’ll probably open the homepage, a few important pages and whatever you’ve just changed. Meanwhile, crawlers are still requesting an old URL from three migrations ago and a page you’d completely forgotten existed. Conveniently, there’s a record of that.
CrawlReplay uses those logs as the starting point. Give it your current and proposed robots.txt files, and it shows which logged crawler requests would become blocked or allowed under the new rules. Handy when a small cleanup turns out to cover rather more URLs than intended.
For a deployment check, it takes a sample of logged URLs and requests them from both the current site and your preview environment. It compares responses, redirects, canonical URLs and indexing directives, and flags changes to language links, structured-data types and page text.
The question is fairly simple: these URLs are already being requested—what happens to them after this change?
It works with Nginx and Cloudflare Logpush logs, with reports you can read locally or use in an automated workflow. You can set thresholds for newly blocked URLs, new noindex directives and worsening HTTP responses, so those findings can fail a check before a release goes ahead.
It’s written in Rust and is still in early development. The checks cover the logged URLs you feed it and the sample you choose for a deployment comparison, so the logs you use matter.
Release history
Version 0.1.0
Added
- Workspace with
crawlreplay-core,crawlreplay-import, andcrawlreplay-reportcrates, plus a binary crate with CLI entry point. policysubcommand that evaluates logged crawler requests against old and newrobots.txtfiles and reports policy transitions (newly blocked, newly allowed) with per-crawler severity.releasesubcommand that fetches baseline and candidate URLs for each sampled log entry, then compares status codes, redirect chains, canonical links, indexability directives, hreflang alternates, schema.org types, and content fingerprints through the comparison pipeline.- Explicit
--baseline-originand--originallowlists, so log host fields do not control outbound network destinations. - Streaming Nginx combined-log parser with bounded record handling.
- Streaming Nginx JSON log parser with configurable field mappings.
- Streaming Cloudflare Logpush HTTP request log parser.
- Shared
parse_line()function incrawlreplay-importwith automatic format detection or explicit--log-formatselection, used by bothpolicyandreleasecommands. - Input from plain text,
.gz(auto-detected by magic bytes), and stdin. - Crawler classification for Google, Bing, OpenAI, Anthropic, and Perplexity with User-Agent pattern matching.
verified,claimed,spoofed, andunknownidentity verdicts. Supported Google common crawlers and Bingbot are checked against exact bundled CIDR snapshots with documented source timestamps and checksums.robots.txtmatching forAllow,Disallow, wildcards, end anchors ($), longest-match-wins semantics, and empty-disallow-means-allow.- Policy evaluation engine with URL/crawler deduplication, request counting, and deterministic finding ordering.
- Release comparison engine covering 13 finding rules:
status_regression,baseline_failure,candidate_failure,redirect_changed,redirect_chain_grew,canonical_changed,canonical_leak,newly_noindex,newly_blocked,newly_allowed,hreflang_changed,schema_type_removed, andcontent_changed. - Async HTTP fetcher with bounded task concurrency, separate baseline and candidate request-start limits, configurable timeouts, exact-origin redirects, streaming response limits, proxy isolation, and DNS-aware special-address blocking.
--requests-per-secondflag on thereleasesubcommand (default 10.0) controlling the fetcher rate limit.- HTML extraction for canonical links, robots meta tags, X-Robots-Tag
headers, hreflang alternates, JSON-LD
@typevalues, and SHA-256 content fingerprints over visible text. - URL normalization (lowercase scheme and host, fragment removal, default-port stripping).
- Query-safe replay by default: parameter names and duplicate order are
retained while values are sent empty.
--replay-query-valuesis an explicit privacy-sensitive opt-in. - Query-value redaction in reports, diagnostics, redirects, canonicals, and hreflang evidence.
- Client addresses used for crawler verification remain in memory and are suppressed from reports by default.
- Deterministic sampling for release replay with
--max-urlsand--seed. - Terminal output with severity coloring, grouped findings, and request
counts; respects
NO_COLORandTERM=dumb. - JSON report with schema version, severity/rule summaries, findings array, and exit-decision field.
- Markdown report with severity summary table and per-rule finding tables (collapsible overflow at 20 entries).
- SARIF 2.1.0 report with rule definitions, severity mapping, artifact locations, and deduplication fingerprints for GitHub code scanning.
- CI threshold configuration for
newly_blocked,status_regression, andnewly_noindexwithunique_urlsandweighted_requestsgates. --thresholds <path>flag on bothpolicyandreleasesubcommands to load threshold configuration from a JSON file.- JSON schemas for threshold configuration (
docs/threshold-schema.json) and report output (docs/report-schema.json), plus an example threshold file (docs/threshold-example.json). - Six deterministic exit codes from
0through5, separating invalid arguments, imports, network comparison failure, and internal errors. - Configuration struct with defaults for concurrency (10), timeout (30 s), max response size (5 MiB), max redirects (10), and rate limit (10 req/s).
- Error types using
thiserrorfor core, import, and report layers. - Unit tests for identity classification, IP verification, robots parsing,
policy evaluation, URL normalization, query redaction, HTML extraction,
content fingerprinting, private-host detection, and shared
parse_lineauto-detection. - Integration tests covering policy replay with all three log formats, all four output formats, verified-only filtering, invalid-argument handling, output determinism, threshold config from file, and invalid threshold file handling.
- Test fixtures: sample Nginx combined, Nginx JSON, and Cloudflare logs
plus old/new
robots.txtfiles. - Multi-stage Dockerfile with digest-pinned Rust and Debian bases, a non-root runtime user, and the project license included in the runtime image.
- GitHub Action composite wrapper (
action/action.yml) supporting bothpolicyandreleasesubcommands. - CI checks for formatting, Clippy, tests, known dependency vulnerabilities, crate assembly, the local composite action, and the container image.
- README, fixture provenance, threat model, security policy, and contribution guide with privacy-safe examples and operator-facing wording.
- Apache-2.0 license.
- MSRV 1.86, edition 2021, resolver 2.
External download

















