# 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.

Published: 2026-11-28
Author: Ajain Vivek

**TL;DR:** Answer Engine Optimization (AEO) makes your developer docs easy for AI search and coding agents to extract and cite accurately. Ship five things: answer-first summaries under question headings, clean Markdown mirrors (.md), llms.txt v2 discovery links, self-contained code blocks, and FAQ/TechArticle JSON-LD.

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](/blog/what-is-llms-txt) and test your own site with the [agent readiness checker](/tools/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](/blog/what-is-llms-txt), advertise your Markdown mirror and `llms.txt` index directly in `<head>` or HTTP `Link:` headers:

```html
<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?

1. **Check `robots.txt`:** make sure you are not accidentally blocking `OAI-SearchBot`, `ClaudeBot`, `PerplexityBot`, or `GPTBot` on public docs if you want citations.
2. **Fetch without JavaScript:** run `curl -s https://your-docs.com/page` and verify the main content is in the initial HTML, not behind a loading spinner.
3. **Run an automated scan:** test your domain on the [agent readiness checker](/tools/agent-readiness-checker) to catch missing `llms.txt`, `Content-Type` issues, 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.

HTML: https://webcrawl.app/blog/aeo-for-developer-docs
