Cloudflare Replaces HTML Agent Errors with RFC 9457 Markdown and JSON

What changed

On March 11, 2026, Cloudflare said on X that it now returns RFC 9457-compliant Markdown and JSON error payloads to AI agents, replacing heavyweight HTML error pages with machine-readable instructions. In its same-day blog post, Slashing agent token costs by 98% with RFC 9457-compliant error responses, the company said clients that send Accept: text/markdown get Markdown, while Accept: application/json and Accept: application/problem+json return structured JSON.

Cloudflare says the rollout now covers all 1xxx-class errors, the platform's edge-side error family for issues such as DNS resolution failures, access denials, and rate limits. The company also says the same contract will extend to Cloudflare-generated 4xx and 5xx errors next. Site owners do not need to configure anything, and browsers keep receiving HTML unless a client explicitly requests Markdown or JSON.

Why this matters

The company's argument is straightforward: HTML error pages are designed for humans, not agents. An agent that gets a long browser-oriented page still has to guess what happened, whether a retry makes sense, and how long it should wait. The new payloads expose operational fields such as error_code, error_category, retryable, retry_after, owner_action_required, and ray_id, which lets software route directly into retry, backoff, or escalation logic.

Cloudflare also attached a clear efficiency claim. In the blog's comparison for a live 1015 rate-limit response, the HTML version was 46,645 bytes / 14,252 tokens. The Markdown response measured 798 bytes / 221 tokens, and the JSON response measured 970 bytes / 256 tokens. That is a reduction of roughly 98%+ in both size and token consumption, which matters when multi-step agents hit multiple errors in a single run.

The broader implication

This is a meaningful shift in how the web is adapting to agent traffic. Instead of forcing AI systems to scrape human-facing error pages, Cloudflare is creating a machine-readable policy contract at the network edge. A rate-limited crawler can obey retry_after. An MCP tool blocked by policy can stop retrying and escalate with deterministic metadata. As Cloudflare puts it, the error page stops being decoration and becomes an execution instruction.

Sources: Cloudflare X post · Cloudflare blog