This document is normative.
| Header | Direction | Purpose |
|---|---|---|
Accept: text/markdown |
Request | Client requests markdown format |
Content-Type: text/markdown; charset=utf-8 |
Response | Server delivers markdown |
Vary: Accept |
Response | Cache key includes Accept |
X-Markdown-Tokens: <integer> |
Response | Estimated token count of body |
X-Robots-Tag: noindex |
Response | Markdown twins SHOULD NOT be indexed as pages |
X-Content-Type-Options: nosniff |
Response | Prevent MIME sniffing (recommended) |
Link: <url.md>; rel="alternate"; type="text/markdown" |
Response | HTML response advertises markdown twin |
X-AEO-Version: 1.0 |
Response | Spec version this server implements (recommended) |
X-Redirect-From: <path> |
Response | Markdown response was redirected from this path (optional) |
X-Redirect-To: <path-or-url> |
Response | Markdown response was redirected to this target (optional) |
MUST be exactly text/markdown; charset=utf-8 for markdown responses. Variations like text/markdown (no charset) are non-conformant — the charset parameter is required to ensure consistent UTF-8 interpretation by AI agents.
MUST be a base-10 integer ≥ 0 representing an estimated token count of the response body. The estimation method is implementation-defined but SHOULD use a method that approximates LLM tokenization (e.g. whitespace-split is acceptable; tiktoken is more accurate).
This header is informational. Clients MAY use it to budget context window usage. Clients MUST NOT rely on it for billing or authorization.
MUST contain the directive noindex to prevent traditional search engines from indexing markdown twins as duplicate pages. Multiple directives are permitted (e.g. noindex, nofollow).
MUST contain Accept (comma-separated, case-insensitive). MAY contain additional tokens (User-Agent, etc.) when applicable.
SHOULD be nosniff to prevent browsers and intermediaries from MIME-sniffing the body.
MUST be set on the HTML response of every page that has a markdown twin, with the form:
Link: <ABSOLUTE-OR-RELATIVE-URL>; rel="alternate"; type="text/markdown"
Multiple Link values MAY be present (comma-separated within a single header value, OR multiple Link header instances per RFC 8288). A conformant server appends the markdown alternate without removing existing values.
A SHOULD-level header indicating the AEO Spec version implemented by the server. Format: <MAJOR>.<MINOR> (e.g. 1.0). Used by conformance test runners and analytics.
OPTIONAL. When a markdown response was served as the result of an internal or external redirect lookup (rather than as the canonical .md for the requested URL), these headers expose the redirect chain for observability. Internal redirects produce a path; external redirects produce an absolute URL.
A conformant server MAY set Cache-Control per its policy. The reference implementation defaults to public, max-age=3600. Servers SHOULD set Cache-Control: public on markdown twins to allow CDN caching with the Vary: Accept key.
A conformant server MAY set Access-Control-Allow-Origin per its policy. Markdown twins MAY be served with Access-Control-Allow-Origin: * to allow programmatic fetch from arbitrary origins (e.g. browser-based AI tools). This is OPTIONAL and out of scope for this version of the spec.
Error responses MAY be served as markdown when the request prefers markdown. A conformant server SHOULD return:
406 Not Acceptablewhen neither HTML nor markdown is acceptable (see content-negotiation.md §4)404 Not Foundwhen no markdown twin exists for the requested URL5xxresponses MAY be served as either format
When error responses are served as markdown, the X-Markdown-Tokens, X-Robots-Tag, and Vary headers MUST still be set.