<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/content-negotiation-on-netlify-15ecpowbe" -->

---
title: Content Negotiation on Netlify | daily.dev
description: A walkthrough of implementing HTTP content negotiation on Netlify using edge functions, so that AI agents requesting `Accept: text/markdown` receive Markdown...
canonical: https://daily.dev/posts/content-negotiation-on-netlify-15ecpowbe
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Content Negotiation on Netlify | daily.dev
og:description: A walkthrough of implementing HTTP content negotiation on Netlify using edge functions, so that AI agents requesting `Accept: text/markdown` receive Markdown...
og:url: https://daily.dev/posts/content-negotiation-on-netlify-15ecpowbe
og:image: https://api.daily.dev/og/posts/15EcPoWbe.png
og:image:alt: Content Negotiation on Netlify
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Content Negotiation on Netlify

**[Kitty says hi.](https://daily.dev/sources/kittygiraudel)** · [@kittygiraudel](https://daily.dev/kittygiraudel) · 7 min read · 1 upvotes · 0 comments

## Summary

A walkthrough of implementing HTTP content negotiation on Netlify using edge functions, so that AI agents requesting `Accept: text/markdown` receive Markdown instead of HTML. The post covers the edge function configuration (filtering by method, Accept header, and URL pattern), the core logic for finding the Markdown counterpart of a blog post URL, handling inner fetch calls safely, and adjusting response headers including `Content-Type`, `Vary`, `Content-Length`, and the optional `X-Markdown-Tokens` header following Cloudflare's convention. Includes curl-based testing examples demonstrating correct behavior for various Accept header combinations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://kittygiraudel.com/2026/04/20/content-negotiation-on-netlify/>

## Similar posts on daily.dev

- [Serving Markdown to LLMs with Eleventy](https://daily.dev/posts/serving-markdown-to-llms-with-eleventy-5w1f4syxp) · Kitty says hi. · 2 upvotes · 0 comments
- [Cloudflare Debuts Markdown for Agents and Content Signals to Guide AI Crawlers](https://daily.dev/posts/cloudflare-debuts-markdown-for-agents-and-content-signals-to-guide-ai-crawlers-xrnlmy5s5) · InfoQ · 1 upvotes · 0 comments
- [Agents grew up, so did our docs](https://daily.dev/posts/agents-grew-up-so-did-our-docs-rucdfhfyl) · Neon · 0 upvotes · 0 comments
- [Cloudflare’s new Markdown support shows how the web is evolving for AI agents](https://daily.dev/posts/cloudflare-s-new-markdown-support-shows-how-the-web-is-evolving-for-ai-agents-q2znpd5ib) · The New Stack · 2 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#markdown](https://daily.dev/tags/markdown), [#netlify](https://daily.dev/tags/netlify)

[View this post on daily.dev](https://daily.dev/posts/content-negotiation-on-netlify-15ecpowbe)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Content Negotiation on Netlify","url":"https://daily.dev/posts/content-negotiation-on-netlify-15ecpowbe","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/content-negotiation-on-netlify-15ecpowbe"},"datePublished":"2026-04-20T10:31:11.800Z","dateModified":"2026-04-21T07:00:30.859Z","description":"A walkthrough of implementing HTTP content negotiation on Netlify using edge functions, so that AI agents requesting `Accept: text/markdown` receive Markdown...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"Kitty says hi.","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Kitty Giraudel","url":"https://daily.dev/kittygiraudel","image":"https://avatars.githubusercontent.com/u/1889710?v=4","description":"Engineering \u0026 Executive Leadership","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":1180}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/content-negotiation-on-netlify-15ecpowbe","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"typescript,markdown,netlify","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Kitty says hi.","item":"https://daily.dev/sources/kittygiraudel"},{"@type":"ListItem","position":3,"name":"Content Negotiation on Netlify"}]}
```

