How to add an llms.txt file to your domain (Vercel, Netlify, Cloudflare)

The hosting-level walkthrough for serving an llms.txt file at the root of your domain on the three most common platforms.

5 min read beginnerUpdated Jun 23, 2026
BI
Reviewed by the editorial team · Jun 23, 2026

Once your llms.txt is written, it needs to be served at https://yourdomain.com/llms.txt with the correct content type. Each host handles static files slightly differently — here's the exact path for the big three.

Before you start
  • A written llms.txt file
  • Deploy access to your hosting platform

Step by step

  1. 01

    Vercel: drop it in /public

    Add the file to your project at public/llms.txt. Commit and push — Vercel serves anything in /public at the root. Verify at /llms.txt.

  2. 02

    Netlify: drop it in the publish directory

    For most setups that's /public, /dist or the root depending on framework. Confirm in netlify.toml under [build] → publish.

  3. 03

    Cloudflare Pages: same as Vercel

    Place llms.txt in your build output directory. For SvelteKit/Astro/Next that's the static directory; for plain HTML, the project root.

  4. 04

    Set the correct Content-Type

    Most hosts auto-serve .txt as text/plain. If yours doesn't, add a _headers file (Netlify/Cloudflare) or vercel.json with 'Content-Type: text/plain; charset=utf-8'.

  5. 05

    Test with curl

    Run: curl -I https://yourdomain.com/llms.txt. Confirm a 200 status and content-type: text/plain.

  6. 06

    Reference it from sitemap.xml

    Add a <url> entry for llms.txt so agentic crawlers find it via your sitemap.

Troubleshooting

File downloads instead of displaying
Wrong Content-Type. Force 'text/plain; charset=utf-8' via your host's headers config.
404 in production
File isn't in the published output. Run a production build locally and confirm llms.txt is in the build directory.
IT & Technical · Done-for-you
Want the boring tech handled?

We set up domains, email, SSL, security and integrations so nothing breaks.

Book a tech call