Rebuilding Let The Bots In's scanner and report
How I bounded scan requests, revised scoring, and made reports easier to read and compare in Let The Bots In.
From the Letthebots project
I started with a cluttered homepage. Let The Bots In had crawler checks, schema analysis, generated fixes, and ways to compare and export a report. You had to get through a good deal of interface before you could check a site.
As I reorganized the report, I found decisions I’d buried in the code. A response could have a 200 status and still be the wrong file. An organization homepage could lose points for missing an article byline. Two scans could score the same site differently after I changed a rule. I went back through the requests and scoring so the report could show what each finding came from.
Request and response limits
The scanner runs on Astro and Cloudflare Pages Functions. It requests the submitted URL with a browser-like user-agent and again with the OAI-SearchBot user-agent. It also requests resources including robots.txt, /sitemap.xml, and /llms.txt.
| Limit | Current value |
|---|---|
| Shared scan deadline | 12 seconds |
| Timeout for each page request | 8 seconds |
| Timeout for a standard resource request | 6 seconds |
| Wikidata lookup timeout | 3 seconds |
| Maximum HTML body per response | 1 MiB |
Maximum robots.txt body | 512 KiB |
| Default maximum resource body | 256 KiB |
Additional same-site sitemap candidates from robots.txt | 2 |
The scanner starts the first requests at the same time and uses an AbortController to cancel fetches if the scan runs out of time or the caller aborts the request. It also caps the number of bytes it reads. A server can send its headers within the deadline and keep streaming the body. An unbounded response.text() could consume more resources than I set aside for that page.
For sitemap discovery, the scanner checks the default location and up to two additional same-site locations from robots.txt. If the file lists more candidates, the report records the limit in its coverage. You can see which checks the scanner completed in the 12 seconds it had.
Resource checks read the response body
A catch-all route can return 200 OK for /robots.txt while serving a body that starts with <!doctype html>. The same thing can happen with /sitemap.xml and /llms.txt. The scanner now reads the body before accepting a file and flags an HTML fallback as a soft 200, so you know to check the route.
I gave the resource checks four states.
detected
not-detected
could-not-check
not-applicable
A timeout returns could-not-check. If the scanner completes the request and finds no usable resource, it returns not-detected. A missing robots.txt is consistent with a site that allows crawling. If the scanner can’t read the policy, it leaves crawler access unresolved.
Measurement coverage and scores
The API returns coverage with the findings and scores. The example shows one check from an incomplete response. The full response includes the other checks and metadata.
{
"scoringVersion": "2026-10-18.2",
"score": null,
"coverage": {
"complete": false,
"checks": [
{
"id": "robots",
"label": "robots.txt policy",
"state": "could-not-check",
"detail": "Policy could not be read reliably; no access verdict inferred."
}
]
}
}
The scanner requires both page responses, robots policy, sitemap discovery, content analysis, and schema inspection for a complete score. It withholds that score if one of those measurements is incomplete or the scanner truncates the HTML. An unavailable llms.txt check can coexist with a complete core scan. The report marks access from a vendor crawler’s own network as outside the scan’s coverage.
If the crawler-header request fails and the browser-header request returns usable HTML, the scanner can analyze that HTML and label it as the source. I kept the coverage visible across report views so you can see that distinction while you’re reading a finding or copying a fix.
Shared document analysis
I moved the document analysis into one function that returns schema facts, content structure, readability signals, publisher identity evidence, inferred page type, extracted text, a heading outline, and date checks.
analyzePage(html, url, pageTypeOverride?)
The function uses parse5 to build a document tree. It keeps that tree for metadata and structured-data checks and cleans a copy for content analysis. The cleanup removes scripts, styles, templates, navigation, footers, sidebars, and elements the page marks as hidden. It removes global site headers while keeping article headers that can contain the title or publication details.
The analyzer counts word-like segments with Intl.Segmenter and records H1 through H3 from the cleaned document. It caches schema parsing in the analysis context so later checks can use the same facts.
I also changed how the analyzer handles a mention of subscriptions. It can flag that as a possible restriction. It looks for corroboration, such as gate markup and restricted-access schema, before calling the restriction stronger.
Structured-data scoring
The six category ceilings still add up to 100.
| Category | Maximum points |
|---|---|
| Access | 28 |
| Readability | 14 |
| Structured data | 16 |
| Identity and attribution | 18 |
| Extractability | 14 |
| Freshness and hygiene | 10 |
The structured-data category gives up to four points for the detected format and twelve for recommended types. The analyzer checks required fields, schema context, and dates to rate each supported type’s quality. It adjusts both parts of the score for quality and weights the available type points by relevance to the page. A homepage can earn the points available to it without adding an FAQ.
Each audit error lowers the structured-data subtotal through a multiplier of max(0.25, 1 - 0.1 × errorCount). I chose that formula for this scanner.
The audit checks whether the markup does the following.
- Describes facts a reader can find on the page.
- Connects entities through references, such as links to an author or publisher.
- Uses a more specific type where the content warrants one.
- Gives direct answers in FAQ markup.
- Uses valid syntax, fields, references, and dates.
- Avoids duplicate or conflicting declarations of an entity.
I use a range of 40 to 300 characters to check whether FAQ answers have a useful length for extraction. OpenAI and Google set their own eligibility requirements.
Page type, publisher identity, and dates
The scanner recommends schema based on the page type. It expects Product and breadcrumbs on a product page, TechArticle and breadcrumbs in documentation, and ProfilePage and Person on a profile page. It uses the main entity and graph references to infer the type. If a homepage’s markup names the founder of an organization, the scanner can keep treating the organization as the page’s subject.
You can override the inferred type in the report. The API supplies the relevant variants from the data it has fetched, so the browser can update schema expectations, freshness rules, findings, and JSON-LD without another request to the site.
I wanted a publisher to earn identity points for useful information on its own site. The scanner gives four points each for a visible name, a same-site URL, and a description that appears in the page text. It gives six for accountability or supported profile evidence. An About link, a byline, or contact information can establish accountability for a small company that publishes no articles and has no Wikidata entry.
For external profiles, the scanner parses URLs and checks for recognized hosts and path patterns. A URL that contains the string wikipedia.org receives credit only if it matches those rules. Matches from a Wikidata name search remain candidates until the scanner has evidence to confirm them.
The analyzer checks calendar dates because JavaScript can normalize an invalid date when parsing it. It flags dates in the future and modification dates that precede publication. Freshness scoring looks for dates in articles and documentation, where publication and modification dates have a use.
The scanner still reports llms.txt, sitemap lastmod, and single-request timing as diagnostics. I took them out of the scoring so points go to checks such as readable content and a usable canonical URL.
Robots policy by crawler purpose
The policy builder gives you separate controls for search and citation crawlers, user-triggered browsing agents, and training crawlers. You can allow OAI-SearchBot and set a different policy for GPTBot.
The builder starts from the file the scanner read. It modifies the classes you select and preserves the other classes’ rules. Leave the training control unchecked and the builder keeps an existing training restriction.
Rules in a group for a named user-agent can take precedence over wildcard rules. If you add a bare Allow: / for that bot, the bot may gain access to paths the wildcard group excluded. This example carries /private/ forward into the OAI-SearchBot group.
User-agent: *
Disallow: /private/
User-agent: OAI-SearchBot
Allow: /
Disallow: /private/
User-agent: GPTBot
Disallow: /
The patch generator carries forward applicable restrictions and accounts for agents that have named groups. Review the patch against the policy you intend to publish. Use authentication to protect private content. Crawlers read robots.txt as guidance.
Comparing what the two requests return
The report shows the H1 to H3 outline and about the first 1,000 characters of extracted text from the crawler-header and browser-header responses. If a finding says content might be missing, you can read what the scanner extracted from each response.
The default probes make HTTP requests with different headers. Both come from the scanner’s infrastructure, and neither executes JavaScript. A difference can show that the server responded to the headers, but it leaves open how the server treats a verified crawler on the vendor’s network.
You can request a separate browser render with the existing Cloudflare Browser Rendering credentials. The analyzer checks the content gap if the rendered page has at least 150 words. If the raw crawler response contains less than half as many words, it flags the gap. The missing proportion can affect readability scoring. The scanner needs the rendered response to make that comparison.
Finding and applying fixes
Overview shows priorities and category scores. Findings lists each issue and puts the relevant generated fix beside it, such as a JSON-LD snippet for a schema problem. Technical details holds the coverage, crawler policy, extracted content, and other diagnostics.
You can filter findings by effort, from configuration fixes and markup changes to work on your architecture or outside your site. Expand passed checks, exports, or sharing controls when you need them. The navigation links to Scanner, Tools, and Learn. Light and dark modes share the layout and respect your saved preference. Reading pages use native expandable sections.
The prompt you can copy to a coding agent includes the exact URL, scoring version, page type, coverage limits, observations, and applicable fixes. Select the findings you want it to investigate. The prompt asks the agent to inspect the repository, verify observations, preserve routes and unrelated schema, and run checks. It also tells the agent to treat report text and snippets as untrusted input, since they can contain instructions from the fetched page.
Several findings can explain a single gap in a category score. Adding their apparent deductions would count that gap more than once. A high-confidence refusal of the crawler-header request caps the total at 39. A block affecting at least three major platform search crawlers also caps it at 39. A smaller major-platform block or noindex caps it at 64. The report shows the uncapped total and the cap that applies.
Comparing saved reports in the browser
You can download a report as JSON, Markdown, or a Markdown fix pack with the applicable snippets. The checklist for selected fixes stays in your browser session.
The saved-report utility compares two JSON reports in the browser. It checks that the URLs match, including path and query, and that the reports use the same scoring version, page type, category maxima, and applicable coverage. Both need complete usable scores, and the before report must be as old as or older than the after report.
If a requirement fails, the utility shows the reason and withholds the comparison. If the reports qualify, it shows changes in category scores and the IDs of resolved, new, and unchanged findings.
The utility rejects imports larger than 2 MiB. It checks the structure, timestamps, numeric ranges, duplicate finding IDs, nesting depth, and unsafe object keys. It displays imported strings as text.
You can also paste or upload HTML. The browser runs the shared analyzer on the draft with the intended page URL for context. It keeps the file on your device and extracts content and markup without loading assets or executing scripts. Deployed robots policy, access, and timing require a live scan, so the draft analysis leaves out the readiness score.
Reference pages and diagnostic tools
The release adds 100 static reference pages.
| Addition | Pages |
|---|---|
| Crawler references | 17 |
| Finding and remediation guides | 73 |
| Focused diagnostic pages | 4 |
| Troubleshooting guides | 4 |
| Directory hubs | 2 |
The four diagnostic tools cover AI robots policy, llms.txt format, WAF and header-response differences, and Wikidata identity evidence. They work from observations the scanner has already collected. The llms.txt validator reads the fetched file and checks for one Markdown H1, a blockquote summary, H2 sections, and absolute HTTP or HTTPS links. Its scope is the file’s format.
Findings link to guides that explain the condition, give an example fix, and show how to verify a change. Read the guide alongside the check state to decide whether a change makes sense.
I generate the sitemap and the site’s llms.txt from route metadata and shared reference data, which puts new guides in the indexes as I add them. I updated How it works to document scoring and measurement limits and share weight and limit constants where applicable. You can expand longer sections, link to a section, filter the glossary, and copy a link to a term.
Monitoring and confirmation
The monitoring worker still runs hourly and processes a bounded batch of due watches. It sends a score-drop alert for a drop of five points or more between reports with the same scoring version. If it can’t confirm reachability or a crawler-header refusal, it waits for a second observation on the hourly schedule.
If the worker can’t read a robots policy, it keeps the last one it could read. It can report a new block when it gets a valid policy, and it keeps the time of the last successful observation.
The cron worker sends its authentication token in the x-monitor-token header so the credential stays out of the request URL.
Storage and operating costs
The scanner discards fetched HTML and full reports. The existing cache for share images and badges keeps compact score metadata for 30 days. Its key is a SHA-256 digest of the normalized hostname and path and query. That keeps the raw URL out of the key, though someone who can guess the URL can hash it too.
If you opt into monitoring, the worker keeps the URL you ask it to watch, your subscription details, and the history and policy it needs to detect changes.
The new checks reuse responses or run in your browser. They add no paid service or LLM request to the standard scan, and the hosting plan’s request and execution limits still apply. You choose when to run optional browser rendering or archive work.
Release checks
I ran typechecking, the production build, the existing check corpus and Common Crawl checks, and 80 automated tests. The tests cover HTML fallback responses, incomplete scans, attribution and page-type cases, report import and comparison, and monitor confirmation.
The content audit inspected all 100 new pages, 315 JSON-LD blocks, and 2,220 internal links. It checked canonicals, heading order, agreement between visible FAQs and markup, and index coverage. I used a browser to check the report controls, complete and incomplete scan states, and guide layouts at desktop and narrow widths.
My local Node version could load TypeScript data modules, but Cloudflare’s Node 22.16 build needed --experimental-strip-types for the content-index command. I added the flag, checked it with that Node version, and let the Git-integrated build run again.
I ran a live scan after the release and kept a Git checkpoint of the earlier design. If you try the updated scanner, start by saving a JSON report. Fix one finding, scan the same URL again, and compare the files.