# Fix: AI user-fetch User-Agent receives the markdown twin

> Web-audit fix skill for the `markdown-agent-ua` check (Content for agents, MAY).

## Goal

Serve the markdown twin to AI on-demand user-fetchers that state no content-type preference.

## Fix

Recognize the AI on-demand user-fetch User-Agents (`ChatGPT-User`, `Claude-User`,
`Perplexity-User`) and serve them the markdown twin when they send `Accept: */*` or no `Accept`.
These fetchers retrieve a page on a person's behalf and parse markdown far more reliably than a
JS-rendered page, so handing them source improves what the assistant reads back. Match the token
case-insensitively and fall through to HTML for everything you do not recognize.

## Resources

- [RFC 7763 (text/markdown)](https://www.rfc-editor.org/rfc/rfc7763)
- [OpenAI bots and User-Agents](https://platform.openai.com/docs/bots)

## Copy-paste prompt

Paste this into your coding agent. [Your audit](https://anc.dev/audit) adds what it observed for this check:

```text
Goal: Serve the markdown twin to AI on-demand user-fetchers that state no content-type preference
Fix: Recognize the AI on-demand user-fetch User-Agents (`ChatGPT-User`, `Claude-User`, `Perplexity-User`) and serve them the markdown twin when they send `Accept: */*` or no `Accept`. These fetchers retrieve a page on a person's behalf and parse markdown far more reliably than a JS-rendered page, so handing them source improves what the assistant reads back. Match the token case-insensitively and fall through to HTML for everything you do not recognize.
Skill: https://anc.dev/fix/markdown-agent-ua
Docs: https://www.rfc-editor.org/rfc/rfc7763, https://platform.openai.com/docs/bots
```

## Verify

Re-run the audit at [https://anc.dev/audit](https://anc.dev/audit) or call the `audit_website` MCP tool; the `markdown-agent-ua` check should report `pass`.
