Skip to main content
AI Discovery StandardsTest ID: markdown-negotiationVerified Specification

HTTP Markdown Content Negotiation Guidelines

Supporting Accept: text/markdown content negotiation so AI tools and LLM agents can request clean markdown versions of your pages directly.

Why this matters for your SEO & AI Visibility:

Serving markdown on demand cuts token consumption by up to 90%, speeding up retrieval and eliminating HTML parsing errors in LLM pipelines.

Step-by-Step Remediation Guide

3 Actionable Steps
  1. 1Inspect incoming HTTP Accept headers for text/markdown or text/x-markdown.
  2. 2If present, serve the raw markdown content with Content-Type: text/markdown; charset=utf-8.
  3. 3Add a Vary: Accept header to ensure intermediate caches do not serve markdown to standard browser users.

Production Implementation Code

typescript

Copy and deploy this production snippet into your application to satisfy the audit test.

markdown-negotiation configuration snippet
// Next.js Route Handler supporting Markdown Negotiation
export async function GET(request: Request) {
  const accept = request.headers.get('accept') || '';
  if (accept.includes('text/markdown')) {
    return new Response(markdownContent, {
      headers: { 'Content-Type': 'text/markdown; charset=utf-8', 'Vary': 'Accept' },
    });
  }
  return new Response(htmlContent, { headers: { 'Content-Type': 'text/html' } });
}

Technical Architecture & In-Depth Details

Why Modern AI Agents Request Markdown

Large Language Models reason natively in markdown. By fulfilling Content Negotiation requests for markdown, your server delivers raw semantic information directly without the styling overhead of traditional web pages.

Need expert engineering assistance?

Resolve this with Operations Hub & AI Architecture

WebCare Pro provides direct senior-level engineering to remediate and pass every test in your audit report.

Explore Solution
Official Technical Standard Reference:HTTP Content Negotiation Standards