---
description: How Markdown for Agents and similar tools convert your pages, what the markdown keeps that visitors don't see, and a curl test you can run on any page.
title: Serve Pages as Markdown for AI Agents
image: https://cdn.prod.website-files.com/6b00ac6e3b04f0fd00321496/6b04b9d9ea2ff1b849f2215c_og-content-academy.png
canonical_url: https://momenticmarketing.com/content-academy/serving-markdown-to-ai-agents
last_updated: 2026-11-27T12:00:00.000Z
---

> Index of this website for AI agents: [/llms.txt](/llms.txt)

[Skip to main content](#main)

Content Academy31 lessons

What you'll be able to do

For web managers, content leads and developers on websites that use Cloudflare or plan to serve markdown to agents.

* Request any page as markdown and read what an agent gets.
* Find duplicate text, hidden messages, empty alt text and obfuscated email in it.
* Write a list of template fixes for your developer.

When an AI agent asks for your page as markdown, a converter turns the whole HTML document into text, including parts visitors don't see, so the way to know what the agent gets is to request the markdown and read it. An AI agent is software that reads websites and completes tasks for a person. Making your pages readable and usable for those agents is called agent experience optimization (AXO). Markdown is a plain-text format that marks headings with `#`, lists with `-` and links with `[text](url)`, and an agent that reads it spends fewer tokens on page code.

## How agents ask for markdown

An agent asks for markdown by sending the HTTP header `Accept: text/markdown` with its request. A website that supports it sends back markdown with the header `Content-Type: text/markdown; charset=utf-8`. A website that does not support it sends the normal HTML.

Cloudflare's Markdown for Agents does the conversion at Cloudflare's network. Cloudflare's documentation says that when a client asks for `text/markdown`, "Cloudflare will detect this, fetch the original HTML version from the origin, and convert it to Markdown before serving it to the client" ([Cloudflare, Markdown for Agents (opens in a new tab)](https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/)). Cloudflare offers it on the Pro, Business and Enterprise plans. The converted response includes `Vary: Accept`, so caches keep the markdown and HTML versions apart, and a `Content-Signal` header, which states the uses of your content you allow and defaults to `ai-train=yes, search=yes, ai-input=yes` when your server sends none. The lesson [Deciding which AI crawlers and agents can use your website](/content-academy/ai-crawler-and-agent-access) explains Content Signals.

Websites without Cloudflare can serve markdown from their own server, for example by publishing a `.md` copy of each page or answering `Accept: text/markdown` in the web server. Either way, a converter or a template produces the markdown, and the problems below came from that step.

## What a converter puts in the markdown

Cloudflare's converter turned the whole HTML document into text, including parts that CSS hides from visitors. On momenticmarketing.com, on November 27, 2026, the markdown versions of our pages contained:

* Front matter: the page's title, meta description and social image, plus an `agent:` block that Cloudflare adds when Search for Agents is on ([Cloudflare, Search for Agents (opens in a new tab)](https://developers.cloudflare.com/ai-search/how-to/search-for-agents/)).
* The navigation and the footer, on each page.
* Image alt text, as `![alt text](image URL)`. The first line of the live Home page's markdown was the logo's alt text: a 60-word paragraph about Momentic.
* The JSON-LD structured data, as a code block.
* Text that the page hides with CSS: duplicate copies of sections for phone layouts, form success and error messages, and closed accordions.

An agent that reads the markdown gets this text as page content. It spends tokens on it, and some of it contradicts what the visitor sees.

## Four problems we found on our own website

We requested Momentic's pages as markdown with curl on November 27, 2026.

### A duplicate paragraph without its link

On the live Home page, the paragraph that starts "If the old playbook stopped making sense" appeared twice. The first copy read "[Let's talk](https://momenticmarketing.com/contact) through what's working." The second copy read "Measurement is messier now. through what's working," with the link text missing. The page had two copies of the section, one for each layout, and CSS showed one at a time. Fix: build one copy of each section and change its layout with CSS, so the HTML contains the text once.

### Logo alt text without company names

The live Home page's markdown listed 12 client logos, each as `![Company logo]`. An agent asked "which brands has Momentic worked with" could not answer from that page. The new website's contact page lists `![GE HealthCare]`, `![CollegeVine]` and the other logos by name. Fix: write alt text that names the thing in the image, and use `alt=""` for decoration.

### An email address hidden by the CDN

On the new website's contact page, the markdown showed `[\[email protected\]](/cdn-cgi/l/email-protection...)` where the email address is. Cloudflare's email address obfuscation, a scrape protection setting, rewrites addresses in HTML, and the converter received the rewritten version. The address was still in the JSON-LD further down. Fix: decide whether you want agents to read your email address. If you do, turn off email obfuscation for that page or zone, or state the address in text the obfuscation does not rewrite, and keep it in the `ContactPoint` markup.

### A form shown as labels and both result messages

The markdown of the new contact page listed the field labels ("Name (required)", "Work email (required)"), then "Thanks. We have your message." and "The form did not send. Check your connection and try again," with no fields and no Send button. An agent reading the markdown sees a success message and a failure message on a page where no one has sent anything. Fix: have the page script insert the result message after the form is sent, into an empty element marked `aria-live="polite"`, so the HTML contains no message until there is one. Add one sentence of text that says what the form asks for and gives another way to reach you, because an agent reading markdown cannot use the form.

## Check the status code too

The live momenticmarketing.com /pricing URL returned HTTP 404 with an HTML "Not Found" page, even to a request for markdown, on November 27, 2026\. Our llms.txt file links to that URL. An agent that follows the link gets a 404 page with no price. Crawlers keep requesting old URLs long after a page is gone: from November 11 to 24, 2026, verified crawlers sent 10,985 requests to 599 URLs that Momentic had removed. Redirect removed pages to their closest replacement.

## Keep the HTML and the markdown in step

Momentic's AI Search Operating Manual (September 2026) sets the rule: no shadow website. A separate "AI version" of a website drifts from the real one and gives two versions of the truth. Generate the markdown from the page people use rather than keeping it as a second copy, and fix problems in the template so both versions change together. The markdown should say what the page says to a visitor, in the same order. Treat it as one more view of the page your templates produce. When you change a template, request one page of that template as markdown and read it. Search indexes built from your pages store the same text: when we set up Cloudflare's Search for Agents, its chunks included navigation links, image markdown and footer text along with the page text ([our setup guide](/blog/cloudflare-search-for-agents)). The lesson [Writing for retrieval](/content-academy/writing-for-retrieval) explains how that text affects which sections a search returns.

## What this means for AI answers

Search indexes built for AI answers convert pages to text in a similar way, so duplicate navigation, hidden pop-ups and repeated sections also end up in the chunks those indexes return. The lesson [Writing for retrieval](/content-academy/writing-for-retrieval) explains how that text affects which sections a search returns.

## Worked example

yourbrand.com/guides/nurse-self-scheduling is a 2,000-word guide. Its markdown version, before the fix:

* Starts with a 40-line navigation menu, including a mega menu with 24 links.
* Repeats the guide's table of contents twice (desktop sidebar and phone drawer).
* Includes a hidden newsletter pop-up: "Wait! Before you go, get our scheduling checklist."
* Lists the author photo as `![IMG_4471.jpg]`.
* Ends with a cookie banner's text and the footer.

After the template fixes:

* Navigation reduced to the main links, with the mega menu built so its links appear once.
* One table of contents.
* The pop-up loads its text only when it opens.
* Author photo alt text: "Dana Ruiz, RN, clinical operations lead at yourbrand."
* The guide body starts within the first 20 lines of the markdown.

The guide's words stayed the same; only the template changed.

## Test your own page (about 15 minutes)

1. Request the page as markdown and save it:

\`\`\`sh

curl -s -D headers.txt -H "Accept: text/markdown" https://www.example.com/ -o page.md

grep -i -E '^(HTTP|content-type|vary|content-signal)' headers.txt

`` ` ``

If `content-type` is `text/html`, your website does not serve markdown, and you can stop here and read the HTML instead (step 4 still applies).

1. Find lines that appear more than once:

\`\`\`sh

grep -v '^\\s\*$' page.md | sort | uniq -c | sort -rn | awk '$1>1' | head -20

`` ` ``

1. Find hidden addresses, empty alt text and stray messages:

\`\`\`sh

grep -n -i -E 'email.protected|!\\\[\\\]|!\\\[image|!\\\[logo|thank you|thanks|error|did not send' page.md

`` ` ``

1. Read the first 40 lines. Write down the line where your page's main content starts, and any text a visitor would not see.
1. Make a list for your developer: each problem, the template it comes from, and the fix.

## Check your page

* The response to `Accept: text/markdown` has `content-type: text/markdown` and status 200.
* The main content starts near the top of the markdown, after the navigation.
* No paragraph or section appears twice.
* Image alt text names what is in the image; decorative images have empty alt text.
* Form success and error messages are absent until a form is sent.
* Your contact email appears in readable text, if you want agents to read it.

Clear checks

## What to do next

Next, write or audit the file that describes your whole website to agents, in [llms.txt: what to put in it](/content-academy/llms-txt-and-agent-files). Momentic sets up markdown, agent files and agent tools on websites as part of [agent experience optimization](/capabilities/axo).

## Questions about this lesson

What is Markdown for Agents?

It is a Cloudflare feature, on Pro, Business and Enterprise plans, that converts a page's HTML to markdown when a client sends the header `Accept: text/markdown`. Browsers still get HTML.

Does serving markdown help SEO?

Markdown reaches only agents that send `Accept: text/markdown`, and we have no data that it changes rankings or AI answers. What we can show is what it sends: on our own website it repeated a paragraph, hid an email address and showed form messages no visitor saw, and each of those came from a template we could fix.

## What changed

Last updated November 2026

![](https://cdn.prod.website-files.com/6b00bc449c8cb14f592e05e8/6b04a19d21e0d2bbf114b068_6b04a17c48a95257ee7df0a5_tamara-hellgren-portrait-900.webp)

Written by

## Tamara Hellgren

Head of Content Strategy

Tamara Hellgren is Head of Content Strategy at Momentic. She has worked in SEO since 2016.

[Read the author's profile](/team/tamara-hellgren)

![](https://cdn.prod.website-files.com/6b00ac6e3b04f0fd00321496/6b00b7e2cb70ab46675d0bfd_momo-momentic-mascot.webp)

## More lessons from the Content Academy

[See all lessons](/content-academy)

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://momenticmarketing.com/#organization",
      "name": "Momentic",
      "legalName": "Momentic LLC",
      "alternateName": [
        "Momentic LLC",
        "Momentic®",
        "Momentic™"
      ],
      "url": "https://momenticmarketing.com/",
      "logo": {
        "@type": "ImageObject",
        "url": "https://cdn.prod.website-files.com/6b00ac6e3b04f0fd00321496/6b00b7e274cd0b435ba8b505_momentic-logo.svg"
      },
      "sameAs": [
        "https://www.linkedin.com/company/momentic-seo",
        "https://www.facebook.com/MomenticSEO/",
        "https://twitter.com/MomenticSEO",
        "https://www.instagram.com/momenticseo/",
        "https://www.crunchbase.com/organization/momentic-677e",
        "https://clutch.co/profile/momentic"
      ]
    },
    {
      "@type": "WebSite",
      "@id": "https://momenticmarketing.com/#website",
      "name": "Momentic",
      "url": "https://momenticmarketing.com/",
      "publisher": {
        "@id": "https://momenticmarketing.com/#organization"
      }
    },
    {
      "@type": "Article",
      "@id": "https://momenticmarketing.com/content-academy/serving-markdown-to-ai-agents#article",
      "headline": "Serving your pages as markdown for AI agents",
      "description": "How Markdown for Agents and similar tools convert your pages, what the markdown keeps that visitors don&#39;t see, and a curl test you can run on any page.",
      "image": [
        ""
      ],
      "wordCount": "1727",
      "url": "https://momenticmarketing.com/content-academy/serving-markdown-to-ai-agents",
      "datePublished": "2026-11-27T12:00:00.000Z",
      "dateModified": "2026-11-27T12:00:00.000Z",
      "author": {
        "@type": "Person",
        "@id": "https://momenticmarketing.com/team/tamara-hellgren#person",
        "name": "Tamara Hellgren",
        "url": "https://momenticmarketing.com/team/tamara-hellgren"
      },
      "publisher": {
        "@id": "https://momenticmarketing.com/#organization"
      },
      "isPartOf": {
        "@id": "https://momenticmarketing.com/content-academy#course"
      },
      "inLanguage": "en-US"
    },
    {
      "@type": "LearningResource",
      "@id": "https://momenticmarketing.com/content-academy/serving-markdown-to-ai-agents#lesson",
      "name": "Serving your pages as markdown for AI agents",
      "url": "https://momenticmarketing.com/content-academy/serving-markdown-to-ai-agents",
      "description": "How Markdown for Agents and similar tools convert your pages, what the markdown keeps that visitors don&#39;t see, and a curl test you can run on any page.",
      "learningResourceType": "Lesson",
      "position": "22",
      "educationalLevel": "Intermediate",
      "teaches": "Requesting a page as markdown; finding duplicate, hidden and obfuscated content in it; template fixes",
      "timeRequired": "PT15M",
      "inLanguage": "en-US",
      "author": {
        "@id": "https://momenticmarketing.com/team/tamara-hellgren#person"
      },
      "publisher": {
        "@id": "https://momenticmarketing.com/#organization"
      },
      "isPartOf": {
        "@type": "Course",
        "@id": "https://momenticmarketing.com/content-academy#course",
        "name": "Content Academy",
        "url": "https://momenticmarketing.com/content-academy",
        "provider": {
          "@id": "https://momenticmarketing.com/#organization"
        }
      }
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://momenticmarketing.com/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Content Academy",
          "item": "https://momenticmarketing.com/content-academy"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "Serving your pages as markdown for AI agents",
          "item": "https://momenticmarketing.com/content-academy/serving-markdown-to-ai-agents"
        }
      ]
    }
  ]
}
```
