Zero-Config Static Hosting for llms.txt on Cloudflare Pages
Cloudflare Pages is an ideal host for static /llms.txt files because plain-text assets are served directly from Cloudflare's global edge cache with zero origin latency and automatic UTF-8 encoding.
1. Place llms.txt in Your Build Output Root
Put your validated llms.txt next to index.html (or inside public/llms.txt for Vite, Astro, or Next.js). Optional custom cache headers can be configured in a _headers file:
/llms.txt Content-Type: text/plain; charset=utf-8 Cache-Control: public, max-age=3600
2. Check Cloudflare's "Block AI Scrapers" Setting
If you want AI search engines like ChatGPT Search or Perplexity to read your /llms.txt, make sure Cloudflare's global Block AI Scrapers and Crawlers toggle does not contradict your intended robots.txt policy.