AI Readiness Auditor — validates that the site serves HTML to browsers and markdown to AI clients via
Accept content negotiation.AI Readiness
AI agents that ask for markdown get clean markdown source instead of a full HTML page.
Compatibility
Browsers keep receiving HTML by default; markdown is only served when explicitly requested.
Accept: text/markdown, while browsers — which send Accept: text/html — keep receiving the normal HTML page. This auditor requests the audited URL both ways and verifies each response’s Content-Type and body.
How it works
The auditor issues two GET requests to the audited URL (following redirects, with HTTP Basic Auth when provided):- Browser request — sends
Accept: text/htmland expects aContent-Typeoftext/htmlorapplication/xhtml+xml. - AI-client request — sends
Accept: text/markdownand expects aContent-Typeoftext/markdownortext/x-markdown. - Body sanity check — when the markdown response declares a markdown media type, the body must not start as a full HTML document (
<!DOCTYPE htmlor<html). - Aggregate — any failing rule makes the audit
FAIL; when every rule passes, the audit isSUCCESS.
;charset=UTF-8 are ignored when comparing content types. An unreachable URL produces an ERROR response; a non-200 status on either request produces a FAIL without evaluating the rules.
What it audits
Every row maps to onecheckRule* method and one CheckCode.
Output documentation
Risks and considerations
AI readiness
- Agents and LLM crawlers that request
text/markdownand receive a full HTML page must parse markup, scripts, and navigation chrome, wasting context window and degrading answer quality. - Serving markdown through
Acceptnegotiation keeps a single canonical URL per page — no separate.mdURLs to publish, crawl, or keep in sync.
Browser compatibility
- Content negotiation must never leak markdown to browsers: a markdown response to
Accept: text/htmlrenders as plain text and breaks the page for every visitor. - Responses that vary by
Acceptshould includeVary: Acceptso caches and CDNs do not serve the markdown variant to browsers or vice versa.
Correct labeling
- A missing
Content-Typeforces clients to sniff the payload, which is unreliable and a known security concern. - Declaring
text/markdownwhile returning an HTML body is worse than not negotiating at all: clients trust the label and feed HTML into markdown pipelines.