Blog20 min read
Make your site visible to AI crawlers and agents
Deep agent/SEO discoverability guide - robots.txt, llms.txt, sitemaps, OpenAPI, MCP, metadata, security headers, and Cloudflare-ready audit experiments.
AI assistants and crawlers increasingly decide whether your docs are usable from machine-readable surfaces: robots.txt, sitemaps, llms.txt, OpenAPI, MCP, and clean metadata. If those are missing or contradictory, agents skip you - even when the HTML is excellent.
This catalog dogfoods those surfaces (/llms.txt, /openapi.json, /developers, MCP). You can audit and generate them with focused experiments running on Cloudflare Workers.
Cloudflare products that help (directly or as the runtime)
| Product / surface | Role | Docs |
|---|---|---|
| Workers | Host robots, llms.txt, APIs, audits | Edge compute |
| Workers AI | Optional summarization / tagging of pages | AI |
| AI Crawl Control | Manage AI crawler access at the edge (zone feature) | AI crawl control |
| Bot Fight Mode / Bots | Bot management signals | Bots |
| Cache | Cache machine-readable docs aggressively | CDN cache |
| HTMLRewriter | Extract metadata for previews | Runtime |
| Fetch | Audit remote robots/sitemaps | Fetch |
Also relevant: Cloudflare’s own guidance around AI crawlers and content signals evolves quickly - start from AI Crawl Control and your zone’s bot settings.
The agent-friendly checklist
- robots.txt - allow the AI bots you want; do not accidentally blanket-deny
- sitemap.xml - list canonical URLs you want indexed
- llms.txt - short index of when-to-use + key links for LLM agents
- Markdown alternatives -
Accept: text/markdownor per-page markdown routes - OpenAPI / API catalog - for callable APIs (OpenAPI on Workers)
- MCP - if you expose tools (Model Context Protocol)
- Accurate metadata - title, description, canonical, OG tags
- Security headers - trustworthy defaults without breaking embeds you need
- Content-Signal / usage preferences - declare search vs training preferences where you publish them
Experiments that help
| Job | Experiment | Cloudflare angle |
|---|---|---|
| See which AI bots robots.txt allows | AI Bot Visibility | Workers Fetch |
| Generate llms.txt-style export | Website to llms.txt | Workers + parse |
| Inspect robots + sitemap consistency | Robots Sitemap Inspector | Fetch |
| Extract OG/meta | Metadata Extractor | HTMLRewriter |
| Grade security headers | Security Headers Grader | Fetch headers |
| Summarize a URL for agents | AI Website Summary | Workers AI |
Practical robots.txt tips for AI
- Be explicit per user-agent when policies differ (retrieval vs training)
- Keep
Sitemap:absolute - Do not
Disallow: /for*if you want search/AI input - prefer path-level rules - Re-test after CDN or framework changes; generators often overwrite robots
- Align robots with zone-level AI Crawl Control so edge policy and file policy do not contradict
AI Bot Visibility is the fastest way to see how popular crawlers interpret your file.
llms.txt that agents actually use
A useful llms.txt is not a dump of every URL. Include:
- One-paragraph product summary
- When to use / not to use
- Links to OpenAPI, MCP, full markdown dump
- A curated experiment or doc list
This site’s /llms.txt follows that shape. Generate starting material for arbitrary sites with Website to llms.txt, then edit for accuracy.
Hosting tip: serve llms.txt from a Worker or static assets with long cache and easy redeploys (Workers static assets when applicable).
OpenAPI + MCP for callable surfaces
If agents should call you, not just read you:
- Publish OpenAPI 3.x at a stable URL
- Keep
operationIds unique and descriptions concrete - Return JSON errors with
error+code(+ hints) - Offer MCP when tool-calling clients are a target audience
Workers are a natural host for these JSON surfaces (Workers routing).
Metadata and trust pages
Agents and humans both use About / Contact / Privacy as trust anchors. Ensure:
- Titles/descriptions via Metadata Extractor patterns
- Security headers via Security Headers Grader
- Canonical URLs that match the sitemap
Ship the audits
- Run AI Bot Visibility against your production origin
- Inspect robots/sitemap with Robots Sitemap Inspector
- Review zone settings in AI Crawl Control
- Publish an
llms.txtat the site root - Ensure titles/descriptions via Metadata Extractor
- Recheck after each major docs deploy
Agent discoverability is SEO for machines. These experiments turn it into a checklist you can automate - each one deploys as a small Worker on Cloudflare, and the products above are the levers you actually tune in the dashboard and docs.
Production checklist
- Align
robots.txtwith AI Crawl Control zone settings. - Publish
sitemap.xmlandllms.txt. - Offer Markdown / OpenAPI / MCP where APIs exist.
- Keep About / Contact / Privacy findable.
- Re-audit after framework or CDN changes with AI Bot Visibility.
- Cache machine-readable docs aggressively via Cache.
FAQ
Allow all AI bots?
Only if that matches your content policy. Many teams allow retrieval bots and restrict training bots - be explicit per user-agent.
Related experiments
These deployable references implement the patterns in this article. Open the docs for API details, then Deploy or clone the source.
- AI Bot Visibility Checker - Check if robots.txt allows or blocks AI crawlers like GPTBot, ClaudeBot, Google-Extended, and PerplexityBot - AI SEO visibility audit
- Website to llms.txt - Convert any webpage into llms.txt format for LLM and AI-agent consumption - AI-readable site summary generator
- Robots Sitemap Inspector - Parse robots.txt and linked sitemaps for any URL - SEO and AI-crawler access debugging from Cloudflare's edge
- Website Metadata Extractor - Extract title, description, Open Graph, Twitter Card, and canonical URL from any webpage - SEO metadata API
- Security Headers Grader - Grade HTTP security headers (HSTS, CSP, X-Frame-Options, and more) for any URL - security header audit from the edge
- AI Website Summary - Summarize any webpage with Workers AI on Cloudflare's edge - fetch URL, extract content, return a concise AI summary