- Priority
- Nice to have Weight 1. Helps agents, rarely decisive on its own.
- Readiness level
- Not a level gate. It counts toward its section score.
- The question
- Can an agent get a product page as Markdown instead of HTML?
On this page
In short
Some AI agents ask for a page as Markdown instead of HTML, because Markdown carries the content without the layout. A store can answer that request directly, link a Markdown copy from the page, or serve one at the page URL with .md added. This check passes when a sampled product page is available as real Markdown that names the product. It is weight 1, a nice to have.
What this check looks at
Markdown is a plain text format with light markup for headings, lists and links. RFC 7763 registers its media type, text/markdown. A Markdown copy of a product page is typically a fraction of the size of the HTML, and holds the parts an agent needs: name, price, availability, attributes and description.
The scanner tries three ways to get a Markdown copy of one sampled product page, in this order, with at most three requests:
- Content negotiation, where the server picks the format from the request's
Acceptheader. The scanner requests the product URL withAccept: text/markdown, text/html;q=0.9, the header a coding agent sends when it prefers Markdown but accepts HTML. - A Markdown alternate. It looks in the page's HTML for a link element with
rel="alternate"andtype="text/markdown", and fetches its target. - The .md neighbour. It requests the product URL with
.mdappended, so/product/stoneware-mug/becomes/product/stoneware-mug.md.
A response counts as Markdown when it answers HTTP 200 with the content type text/markdown. It must also name the product: the scanner looks for the product name from the page's structured data, or its title, in the first 200,000 characters of the body.
Why it matters for AI agents
HTML pages are built for browsers. Navigation, scripts, styles and tracking code often outweigh the product content many times over. An agent works within a context window, the limited amount of text a model can read at once, and spends most of it on markup it will throw away. A Markdown copy hands it the content directly.
Coding agents and some AI tools already send Accept: text/markdown. Cloudflare and Vercel document ways for sites to answer such requests with Markdown. Search crawlers, by contrast, request HTML. So a Markdown copy helps agents that read pages on demand, and does nothing for indexing. That is why this check carries weight 1 and gates no level.
A Markdown copy is an addition, never a replacement. Your HTML must still carry the product content without JavaScript.
How the scanner decides
- Pass: content negotiation returns
text/markdownthat names the product, with aVary: Acceptheader (Vary: *also counts). - Warn: content negotiation returns Markdown that names the product, but without
Vary: Accept. A shared cache, such as a CDN, may then store the Markdown copy and serve it to browsers, or the reverse. - Pass: negotiation gave no Markdown, but the Markdown alternate linked from the page, or the
.mdneighbour, answerstext/markdownthat names the product. - Fail: a response labelled
text/markdownis really HTML: its body starts with a tag, or carries a doctype or anhtmltag near the top. Converted Markdown starts with front matter or a heading, never with markup. - Fail: none of the three ways produced Markdown that names the product.
- Skip: no product page was sampled.
How to fix it
Pick one approach. Content negotiation is the most direct, because the agent gets Markdown from the URL it already has. A .md twin linked with rel="alternate" is simpler to build and cache.
WordPress and WooCommerce
- Plugins exist that serve posts and products as Markdown, either at a
.mdURL or through content negotiation. Check what a plugin includes for products: price, stock and attributes, not just the description. - If you build it yourself, hook into the request early, check the
Acceptheader fortext/markdown, and render the product's title, price, availability, SKU, attributes and description as Markdown. - Send
Content-Type: text/markdown; charset=utf-8andVary: Accept, and make sure your page cache varies on theAcceptheader or bypasses Markdown requests.
Shopify
- Shopify themes control the HTML, not content negotiation, so a negotiated Markdown response needs a layer in front of the store, such as a CDN or proxy.
- If your store sits behind Cloudflare, its Markdown for Agents feature can convert HTML to Markdown for requests that ask for it. Check the result on a product page to make sure the price and availability survive the conversion.
Any other stack
- In your server or framework, branch on the
Acceptheader for product routes. Return Markdown whentext/markdownis preferred and HTML otherwise. - Always send
Vary: Accepton both versions, so caches keep them apart. - Alternatively, serve a Markdown twin at the page URL plus
.md, and link it from the HTML head withrel="alternate"andtype="text/markdown". - Generate the Markdown from your product data, not by stripping tags from the HTML. Start with an H1 for the product name, then price, availability, identifiers, attributes and description.
Verify it yourself
Request a product page the way a coding agent does and inspect the headers and the first lines:
curl -sS -D - -H 'Accept: text/markdown, text/html;q=0.9' https://example.com/product/stoneware-mug/ | head -n 25
curl -sS -D - https://example.com/product/stoneware-mug.md | head -n 25
You want Content-Type: text/markdown, a Vary header that includes Accept, and a body that starts with a heading or front matter and names the product.
Common mistakes
- Labelling HTML as Markdown. Changing the content type without converting the body sends agents HTML they did not ask for. The scanner fails that.
- Forgetting Vary: Accept. Without it, a CDN may cache the Markdown copy and serve it to the next browser visitor.
- A Markdown copy without the price. A description alone does not answer shopping questions. Include price, currency and availability.
- A .md URL that falls back to HTML. If
/product/mug.mdreturns the HTML page with status 200, it is not a Markdown copy.
FAQ
Do AI agents request Markdown?
Some do. Coding agents and several AI tools send Accept: text/markdown when fetching pages. Search crawlers request HTML, which is why this check has a low weight.
What is the Vary: Accept header for?
It tells caches that the response depends on the request's Accept header. Without it, a shared cache can serve the Markdown version to a browser, or the HTML version to an agent that asked for Markdown.
Should I use content negotiation or a .md URL?
Either passes. Content negotiation serves Markdown at the URL the agent already has. A .md twin is easier to cache and test. If you choose the twin, link it with rel="alternate" and type="text/markdown".
Can Cloudflare convert my product pages to Markdown?
Cloudflare documents a Markdown for Agents feature that converts HTML to Markdown for requests that ask for it. Test the output on a product page, because an automatic conversion may drop details your template shows visually.
The fix in one step
Serve a Markdown copy of product pages: answer `Accept: text/markdown` with real Markdown (name, price, availability, identifiers, attributes, description) and `Vary: Accept`, or publish a `.md` twin linked with `rel="alternate"`.
Accept: text/markdown
HTTP/1.1 200 OK
Content-Type: text/markdown; charset=utf-8
Vary: AcceptBy platform
- WordPress and WooCommerce
- Prefer WordPress and plugin hooks and settings over editing theme files.
Prompt for a coding agent
A scan found that the product pages of this site offer no usable Markdown copy: no Markdown at all, Markdown without a `Vary: Accept` header, or HTML labelled `text/markdown`. Make a request for a product page with `Accept: text/markdown` return a Markdown rendering generated from the product data (not by stripping tags from the HTML): an H1 with the product name, then price with currency, availability, SKU and GTIN, attributes, description and links to the policies. Serve it as `text/markdown; charset=utf-8` with `Vary: Accept`, and make sure the page cache varies on `Accept` or bypasses these requests. If negotiation is impractical, serve the same Markdown at the page URL with `.md` appended and link it from the HTML head with `<link rel="alternate" type="text/markdown" href="...">`. Verify with `curl -sS -D - -H 'Accept: text/markdown' <product URL>`: the response must be `text/markdown`, carry `Vary: Accept`, start with a heading or front matter and name the product.
Sources and specifications
See how your store does
One scan runs every check in this knowledge base against your site and ends with a prioritised fix list.