Bot Detection Configuration
The [bot] section configures how PRISM identifies bot user agents. In bot-only mode, only requests from detected bots are rendered; all other requests are proxied directly to the origin.
TOML Example
[bot]
patterns = [
# Search engines
"Googlebot",
"Googlebot-Image",
"Googlebot-Video",
"Googlebot-News",
"Storebot-Google",
"Google-InspectionTool",
"GoogleOther",
"bingbot",
"Baiduspider",
"YandexBot",
"DuckDuckBot",
"DuckAssistBot",
"Slurp",
"Applebot",
"Applebot-Extended",
"PetalBot",
"Sogou",
"SeznamBot",
"Amazonbot",
"Bravebot",
# AI/LLM crawlers
"GPTBot",
"ChatGPT-User",
"OAI-SearchBot",
"ClaudeBot",
"Claude-User",
"Claude-SearchBot",
"anthropic-ai",
"PerplexityBot",
"Bytespider",
"meta-externalagent",
"Meta-ExternalFetcher",
"FacebookBot",
"CCBot",
"DeepSeekBot",
"cohere-ai",
"Diffbot",
"YouBot",
"PhindBot",
"FirecrawlAgent",
"Timpibot",
"ImagesiftBot",
# Social / link preview
"facebookexternalhit",
"Twitterbot",
"LinkedInBot",
"Pinterestbot",
"Discordbot",
"WhatsApp",
"TelegramBot",
"Slackbot",
"redditbot",
"Snap URL Preview",
"Bluesky",
"Mastodon",
"Viber",
"kakaotalk-scrap",
"Iframely",
"FlipboardProxy",
# SEO tools
"AhrefsBot",
"SemrushBot",
"MJ12bot",
"DotBot",
"DataForSeoBot",
"ContentKingApp",
"Screaming Frog",
"Embedly",
"Quora Link Preview",
# Archive
"ia_archiver",
]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
patterns | Array of Strings | (60+ patterns, see above) | User-agent substrings that identify bot traffic |
exclude | Array of Strings | [] | User-agent substrings of clients that are never treated as bots. See Excluding clients |
Detection Strategy
PRISM uses a two-layer bot detection approach:
-
Primary:
isbotcrate -- PRISM first checks theUser-Agentheader against theisbotlibrary, which maintains a comprehensive, regularly updated database of known bot signatures. -
Fallback:
patternslist -- Ifisbotdoes not match, PRISM checks whether theUser-Agentcontains any of the configured pattern strings as a substring. Matching is case-insensitive.
This dual approach ensures reliable detection even for new or niche crawlers not yet in the isbot database.
Excluding clients
isbot flags almost every non-browser client: load-balancer health checkers, CDN fetchers, HTTP libraries, uptime monitors. A flagged client gets bot handling, which means a rendered page, or a 503 when Chrome is unavailable or busy, and (on a route that renders) its cookies are removed. For a load-balancer health check that 503 takes a healthy site out of rotation.
A client that is excluded is never a bot: it gets the visitor path and its request reaches the origin untouched. Two lists do this:
bot.exclude: your own list. Each entry is a case-insensitive substring of theUser-Agent, likepatterns.- Built-in exclusions, always in force:
ELB-HealthChecker,Amazon-Route53-Health-Check-Service,GoogleHC,kube-probe,Amazon CloudFront,Cloudflare-Healthchecks,Cloudflare-Traffic-Manager,Azure Traffic Manager Endpoint Monitor,Edge Health Probe,Consul Health CheckandEnvoy/HC.
When several rules match, the strongest wins:
bot.exclude: never a bot.bot.patterns: a bot. This lets you override a built-in exclusion by listing it inpatterns.- The built-in exclusions: never a bot.
isbot.
Empty strings in exclude are ignored. The /explain admin endpoint uses the same rules as the request path.
[bot]
exclude = ["MyUptimeMonitor"]
Cookies
Chrome renders anonymously: a crawler's cookies never reach it. To keep the proxied answer consistent with that, cookies are also removed when a request PRISM would render for a bot — a bot, on a route that renders, with GET or HEAD — is passed to the origin without a render attempt, which happens on an unlicensed instance and for render-all's authenticated bypass. The Cookie header is dropped before the request reaches the origin and Set-Cookie is dropped from the response.
When a render was attempted and PRISM falls back to the origin — the document is not HTML, there is no capacity, the render failed — the request is forwarded as the client sent it, cookies included.
A bot-flagged request with any other method, or on a route excluded from rendering such as /api/**, is proxied with its cookies and the origin's Set-Cookie intact, so an API client or native app that isbot flags can keep a session. Visitor requests are never changed.
Detailed Explanation
Pattern matching
Each entry in the patterns array is treated as a case-insensitive substring match against the full User-Agent header. For example, the pattern "Googlebot" matches:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)Googlebot-Image/1.0Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1)
Default pattern categories
The default list covers four major categories:
- Search engines (20 patterns): Google, Bing, Baidu, Yandex, DuckDuckGo, Apple, and regional search engines
- AI/LLM crawlers (21 patterns): GPTBot, ClaudeBot, PerplexityBot, DeepSeekBot, and other AI training/search crawlers
- Social/link preview (16 patterns): Facebook, Twitter/X, LinkedIn, Discord, WhatsApp, Telegram, Slack, Reddit, Bluesky, Mastodon
- SEO tools and archives (10 patterns): Ahrefs, Semrush, Screaming Frog, Internet Archive
Overriding the default list
Setting patterns in your config replaces the entire default list. If you only want to add a custom bot, you must include the defaults plus your additions:
[bot]
patterns = [
"Googlebot",
"bingbot",
# ... include defaults you need ...
"MyCustomCrawler",
]
Example Use Cases
Minimal bot list for testing
[bot]
patterns = ["Googlebot", "bingbot"]
Adding a custom internal crawler
[bot]
patterns = [
# Keep all defaults plus your custom bot
"Googlebot",
"bingbot",
"Baiduspider",
"YandexBot",
# ... other defaults ...
"InternalMonitorBot",
"MyCompanyCrawler",
]
Rendering for all traffic (no bot detection needed)
If you use render-all mode, the bot patterns list is not consulted for routing decisions, but it is still used for analytics and the X-Prism-Bot response header.
[server]
mode = "render-all"
# Bot patterns are still used for tagging, not routing
[bot]
patterns = ["Googlebot", "bingbot"]
Verifying claimed crawlers (FCrDNS)
patterns answers "does this User-Agent claim to be a bot"; nothing above
answers "is the claim true". A spoofed Googlebot UA buys the expensive path —
a render, a Chrome tab, a cache entry — for the cost of one header.
[bot.verify] checks claimed identities the way their operators document:
the client IP's PTR record must land in the operator's domain
(crawl-66-249-66-1.googlebot.com), and the forward lookup of that name must
contain the same IP. Verdicts are cached per IP (verified 24h, spoofed 60m by
default), so a real crawl costs one pair of lookups, not one per request.
[bot.verify]
enabled = true # observe: verdicts in metrics and logs
enforce = false # act: proven-spoofed crawler UAs are treated as humans
In bot-only mode, enforcement means a proven-spoofed request is proxied —
never rendered, never occupying a Chrome tab. In render-all mode it is still
rendered (as any human is) but keyed and logged as a human. Logging:
spoofed is a warning, unverifiable an info line, verified debug-level;
the metric carries all three unconditionally.
Three verdicts, deliberately asymmetric:
- verified — the round trip completed and confirmed the claim.
- spoofed — a completed check positively failed: PTR outside the operator's domain, no PTR at all, or the forward lookup did not contain the client IP. Only this verdict is ever enforced against.
- unverifiable — DNS timed out or failed. Never enforced against: a degraded resolver must not demote real Googlebot traffic to the raw JavaScript shell.
Built-in rules cover Googlebot, bingbot, Applebot, Yandex and Baiduspider
with each operator's published rDNS domains. The Googlebot rule accepts .googlebot.com and .google.com; it does not accept .googleusercontent.com, because every Google Cloud customer's VM has a name there. If you relied on that suffix, restate the rule under rules. An explicit rules key in
config replaces that list rather than extending it — restate the
defaults you want to keep. A user agent matching no rule — an SEO crawler,
curl, your monitoring — claims nothing verifiable and is left exactly as
patterns classified it.
The name found in the reverse lookup is confirmed with a forward lookup of the absolute name (with the trailing dot), so a search domain in your resolver configuration is never appended. A trailing dot on a reverse name does not affect suffix matching.
Watch prism_bot_verification_total{outcome=...}: spoofed rising is an
attack becoming visible; unverifiable rising is your resolver degrading —
different alerts.
Verification settings
Parameter under [bot.verify] | Default | Meaning |
|---|---|---|
enabled | false | Run forward-confirmed reverse-DNS verification |
enforce | false | Treat proven-spoofed claimed crawlers as human traffic |
timeout_ms | 150 | DNS verification time budget |
cache_ttl_hours | 24 | Verified verdict lifetime |
negative_ttl_minutes | 60 | Spoofed verdict lifetime |
rules | Built-in crawler rules | Replacement rule list, not appended to defaults |
Each [[bot.verify.rules]] entry has a ua_fragment string and an
rdns_suffixes array. For example, this intentionally configures Googlebot only:
[bot.verify]
enabled = true
enforce = false
timeout_ms = 150
cache_ttl_hours = 24
negative_ttl_minutes = 60
[[bot.verify.rules]]
ua_fragment = "googlebot"
rdns_suffixes = [".googlebot.com", ".google.com"]
Configure server.trusted_proxies when an edge proxy supplies the client IP;
otherwise verification sees the proxy's address rather than the crawler's.
Loopback is trusted by default.
Client addresses that are not publicly routable (loopback, private, link-local,
carrier-grade NAT, unique-local) are never judged: PRISM makes no DNS lookup
and the verdict is unverifiable, so with enforce = true such a request keeps
its user-agent classification.