BlogAEO
AEO for developer docs: how to get cited by ChatGPT, Claude, and Perplexity
Answer Engine Optimization for developer docs: answer-first sections, Markdown mirrors, llms.txt, JSON-LD, and clean code examples.
Traditional SEO optimizes for ten blue links. Answer Engine Optimization (AEO) optimizes for systems that read a page, extract one self-contained chunk, and cite it inside an answer, whether that is Perplexity, ChatGPT Search, Google AI Overviews, or Claude Code reading your docs over MCP.
Pair this guide with what is llms.txt and test your own site with the agent readiness checker.
#How is AEO different from traditional SEO for docs?
| Focus | Traditional SEO | AEO for developer docs |
|---|---|---|
| Primary unit | Whole page ranking for keywords | Self-contained section or Q&A chunk |
| Format preference | Rendered HTML | Clean HTML + .md mirrors + llms.txt |
| Opening style | Context-setting intro paragraphs | Direct 40–60 word answer first |
| Structured data | Basic title/meta description | FAQPage, TechArticle, BreadcrumbList |
| Discovery | sitemap.xml + robots.txt | sitemap.xml + llms.txt + Link: rel="alternate" |
#What makes a docs page easy for answer engines to cite?
#1. Lead with a direct answer
Put a 40–60 word summary right under the title or H2 question before diving into edge cases. Retrieval pipelines and AI overviews heavily weight the first paragraph after a heading.
#2. Write H2 headings as real developer questions
Headings like ## Overview or ## Details tell a retriever nothing when a chunk is isolated. Headings like ## How do you authenticate with the REST API? or ## What are the rate limits on the free tier? match the exact queries developers type.
#3. Keep code examples self-contained
Every snippet should include imports, endpoint URL, auth header, and expected output shape. Agents copy snippets directly; if client is undefined in the block, the agent hallucinates an import.
#4. Serve clean .md mirrors and llms.txt v2 links
Under llms.txt v2, advertise your Markdown mirror and llms.txt index directly in <head> or HTTP Link: headers:
<link rel="alternate" type="text/markdown" href="https://example.com/docs/auth.md" />
<link rel="describedby" href="https://example.com/llms.txt" />
#5. Add JSON-LD that matches visible content
Emit FAQPage for your FAQ section, TechArticle or BlogPosting with dateModified for guides, and BreadcrumbList so crawlers understand your hierarchy. Keep JSON-LD strictly aligned with visible text.
#How do you check whether AI crawlers can actually read your docs?
- Check
robots.txt: make sure you are not accidentally blockingOAI-SearchBot,ClaudeBot,PerplexityBot, orGPTBoton public docs if you want citations. - Fetch without JavaScript: run
curl -s https://your-docs.com/pageand verify the main content is in the initial HTML, not behind a loading spinner. - Run an automated scan: test your domain on the agent readiness checker to catch missing
llms.txt,Content-Typeissues, or blocked endpoints.
#FAQ
#Does AEO hurt traditional Google search rankings?
No. Clear question headings, concise answers, fast static HTML, and valid JSON-LD improve both Google Search and AI answer engines.
#Should we block AI training bots while allowing AI search bots?
Many teams allow search/retrieval bots (OAI-SearchBot, PerplexityBot, Claude-SearchBot) while opting out of training crawlers in robots.txt or via Content Signals. Check each bot's current documentation before writing rules.
#What is the fastest AEO win for an existing Mintlify, Docusaurus, or Next.js docs site?
Add an accurate /llms.txt file, expose .md mirrors for your core guides, and add a 3-question ## FAQ with FAQPage JSON-LD to your highest-traffic pages.