Auditing GPTBot, PerplexityBot, ClaudeBot & /llms.txt: A Technical Checklist for AI Search Citations
A growing share of high-intent developer and B2B discovery now happens inside answer engines—ChatGPT Search, Perplexity, Claude with web search, and Gemini—before a buyer ever clicks a traditional blue link. Yet when we
A growing share of high-intent developer and B2B discovery now happens inside answer engines—ChatGPT Search, Perplexity, Claude with web search, and Gemini—before a buyer ever clicks a traditional blue link.
Yet when we audit technical SaaS and e-commerce sites for AI search visibility (AEO / GEO), over 70% have accidentally locked themselves out of citations because of four fixable infrastructure mistakes:
- Blocking live retrieval bots while trying to opt out of LLM pre-training.
- Allowing bots in
robots.txtwhile Cloudflare WAF / Bot Fight Mode returnsHTTP 403to those exact user-agents. - Serving critical pricing, specs, and FAQs behind client-side JavaScript bundles that retrieval fetchers never hydrate.
- Shipping zero structured entity context (
/llms.txt+ JSON-LD@graph), forcing the model to guess what your product actually does.
Here is the exact technical checklist, production robots.txt, /llms.txt spec, JSON-LD template, and a Python verifier script to audit your domain in seconds.
1. Training Crawlers vs. Live Citation Crawlers (Do Not Confuse Them)
This is the #1 mistake in modern robots.txt files. Major AI labs deliberately separate model training crawlers from real-time search/citation fetchers:
| Provider | Model Training Bot | Live Search / Citation Indexer | User-Triggered Live Fetcher |
|---|---|---|---|
| OpenAI | GPTBot |
OAI-SearchBot |
ChatGPT-User |
| Anthropic | ClaudeBot |
Claude-SearchBot |
Claude-User |
| Perplexity | — | PerplexityBot |
Perplexity-User |
Google-Extended |
Googlebot |
— |
If your legal team wants to opt out of pre-training without disappearing from live ChatGPT/Perplexity/Claude citations, your robots.txt should split them explicitly:
# Allow live search & user-triggered citation fetchers
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Perplexity-User
Allow: /
User-agent: Claude-SearchBot
Allow: /
User-agent: Claude-User
Allow: /
# Optional: disallow foundation-model pre-training crawlers while preserving search citations
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
# Standard crawlers
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/private/
Sitemap: https://yourdomain.com/sitemap.xml
The Edge WAF Trap: Even with
Allow: /inrobots.txt, Cloudflare's "Block AI Scrapers and Crawlers" toggle or aggressive Managed WAF rules frequently return403 ForbiddentoOAI-SearchBotandPerplexityBot. Always test real HTTP responses at the edge—don't just readrobots.txt.
2. Implementing a Clean /llms.txt File
Proposed as a lightweight markdown index at https://yourdomain.com/llms.txt, /llms.txt gives LLM retrieval agents and IDE coding assistants a clean, token-efficient map of your canonical documentation, pricing, API specs, and product positioning without parsing megabytes of nav chrome and cookie banners.
A valid /llms.txt follows four strict structural rules:
- Exactly one
H1(# Brand or Project Name). - A concise
>blockquote summarizing what the product does, who it serves, and core factual constraints. - Curated
## Sectionlists using[Page Title](https://canonical-url): concise factual description. - An optional
## Optionalsection for secondary pages that context-constrained agents can safely skip.
# Acme Telemetry
> Acme Telemetry is an OpenTelemetry-native log and trace ingestion engine for Go, Python, and Node.js services. Self-hosted Apache-2.0 core or managed cloud starting at $49/mo with 30-day retention and zero per-seat fees.
## Core Documentation
- [Quickstart & SDK Setup](https://acme.dev/docs/quickstart): Install the OTLP exporter in under 5 minutes for Go, Python, and TypeScript.
- [Pricing & Ingestion Limits](https://acme.dev/pricing): Transparent per-GB ingestion pricing ($0.25/GB), retention tiers, and SLA guarantees.
- [Security & SOC 2 Type II](https://acme.dev/security): Encryption at rest (AES-256), HIPAA BAA eligibility, and EU/US data residency regions.
## Technical Comparisons & Playbooks
- [Acme vs. Datadog Cost Model](https://acme.dev/compare/datadog): Exact ingestion math comparing custom metric cardinality and host pricing.
- [OpenTelemetry Collector Config](https://acme.dev/docs/otel-collector): Production YAML pipeline with tail-based sampling and PII scrubbing.
## Optional
- [Changelog](https://acme.dev/changelog): Monthly release notes and SDK versions.
- [Status Page](https://status.acme.dev): Live uptime history and incident reports.
Serve /llms.txt with HTTP 200, Content-Type: text/markdown; charset=utf-8 (or text/plain; charset=utf-8), and clean Cache-Control: public, max-age=3600.
3. Server-Rendered JSON-LD @graph Entity Disambiguation
Retrieval-augmented generation (RAG) pipelines rely heavily on deterministic structured facts (price, category, publisher identity, authoritative sameAs links, and concise Q&A pairs) rendered directly in the initial HTML payload—not injected after window.onload.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://acme.dev/#organization",
"name": "Acme Telemetry",
"url": "https://acme.dev/",
"sameAs": [
"https://github.com/acme-telemetry",
"https://www.linkedin.com/company/acme-telemetry"
]
},
{
"@type": "SoftwareApplication",
"@id": "https://acme.dev/#product",
"name": "Acme Telemetry Cloud",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Linux, macOS, Cloud",
"publisher": { "@id": "https://acme.dev/#organization" },
"offers": {
"@type": "Offer",
"price": "49.00",
"priceCurrency": "USD"
}
},
{
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "Does Acme Telemetry charge per seat?",
"acceptedAnswer": {
"@type": "Answer",
"text": "No. Pricing is strictly per ingested GB ($0.25/GB) with unlimited team seats on every tier."
}
}
]
}
]
}
</script>
4. Copy-Pasteable Python AI-Search & /llms.txt Auditor
Run this script against any domain (python3 audit_aeo.py https://yourdomain.com) to verify live edge HTTP status codes per AI bot user-agent, robots.txt directives, /llms.txt structure, and SSR JSON-LD coverage:
#!/usr/bin/env python3
"""Audit AI crawler reachability, robots.txt rules, /llms.txt validity, and SSR JSON-LD."""
import json
import re
import sys
import urllib.error
import urllib.request
import urllib.robotparser
from urllib.parse import urljoin
AI_BOTS = [
"OAI-SearchBot",
"ChatGPT-User",
"GPTBot",
"PerplexityBot",
"Claude-SearchBot",
"ClaudeBot",
]
def fetch(url: str, user_agent: str = "Mozilla/5.0") -> tuple[int, str, str]:
req = urllib.request.Request(url, headers={"User-Agent": user_agent})
try:
with urllib.request.urlopen(req, timeout=10) as resp:
ctype = resp.headers.get("Content-Type", "")
body = resp.read().decode("utf-8", errors="replace")
return resp.status, ctype, body
except urllib.error.HTTPError as err:
return err.code, err.headers.get("Content-Type", ""), ""
except Exception as exc:
return 0, str(exc), ""
def audit(base_url: str) -> None:
if not base_url.startswith(("http://", "https://")):
base_url = "https://" + base_url
base_url = base_url.rstrip("/") + "/"
print(f"=== AEO / AI Search Technical Audit: {base_url} ===\n")
# 1. Parse robots.txt
robots_url = urljoin(base_url, "/robots.txt")
r_code, _, r_body = fetch(robots_url)
rp = urllib.robotparser.RobotFileParser()
rp.parse(r_body.splitlines()) if r_code == 200 else None
print(f"[robots.txt] HTTP {r_code}")
# 2. Check robots.txt rule + real edge HTTP status per AI User-Agent
print("\n[AI Crawler Access Matrix]")
for bot in AI_BOTS:
allowed_in_robots = rp.can_fetch(bot, base_url) if r_code == 200 else True
edge_code, _, _ = fetch(base_url, user_agent=f"Mozilla/5.0 (compatible; {bot}/1.0)")
status = "OK" if (allowed_in_robots and edge_code == 200) else "BLOCKED/MISMATCH"
print(f" - {bot:<18} robots.txt={'ALLOW' if allowed_in_robots else 'DISALLOW':<8} edge_http={edge_code:<4} -> {status}")
# 3. Validate /llms.txt
llms_url = urljoin(base_url, "/llms.txt")
l_code, l_ctype, l_body = fetch(llms_url)
has_h1 = bool(re.search(r"^#\s+\S+", l_body, re.M))
has_quote = bool(re.search(r"^>\s+\S+", l_body, re.M))
md_links = len(re.findall(r"\[[^\]]+\]\(https?://[^)]+\)", l_body))
print(f"\n[/llms.txt] HTTP {l_code} | Content-Type: {l_ctype}")
if l_code == 200:
print(f" - H1 header: {has_h1} | Summary blockquote: {has_quote} | Markdown links: {md_links}")
else:
print(" - Missing /llms.txt (recommended for structured LLM context ingestion)")
# 4. Validate Server-Rendered JSON-LD & SSR text density
h_code, _, html = fetch(base_url)
ld_blocks = re.findall(
r'<script[^>]*type=["\']application/ld\+json["\'][^>]*>(.*?)</script>',
html,
flags=re.I | re.S,
)
types_found: list[str] = []
for raw in ld_blocks:
try:
obj = json.loads(raw.strip())
nodes = obj.get("@graph", [obj]) if isinstance(obj, dict) else (obj if isinstance(obj, list) else [])
for node in nodes:
if isinstance(node, dict) and "@type" in node:
t = node["@type"]
types_found.extend(t if isinstance(t, list) else [str(t)])
except json.JSONDecodeError:
types_found.append("INVALID_JSON_LD")
visible_text = re.sub(r"<(script|style)[^>]*>.*?</\1>", " ", html, flags=re.I | re.S)
visible_text = re.sub(r"<[^>]+>", " ", visible_text)
word_count = len(visible_text.split())
print(f"\n[SSR & Structured Data] Homepage HTTP {h_code}")
print(f" - Raw SSR word count (no JS): {word_count} {'(WARNING: thin CSR shell?)' if word_count < 150 else '(healthy SSR)'}")
print(f" - JSON-LD blocks: {len(ld_blocks)} | @type values: {sorted(set(types_found))}")
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.exit("Usage: python3 audit_aeo.py https://yourdomain.com")
audit(sys.argv[1])
Run an Instant Browser Audit & Grab a Template
If you want to run this exact check in the browser with a weighted AEO readiness score—or copy a complete production /llms.txt specification & template—we published a free live scanner at CitationSprint.
Treat AI crawlers the way you treat API consumers: separate pre-training from retrieval cleanly, verify edge status codes instead of assuming robots.txt is enough, serve factual SSR HTML, and give agents a crisp /llms.txt index.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.