/ llmtxt.info

llms.txt on Netlify

Netlify serves any file in your publish directory at the site root. For llms.txt that means zero configuration.

Last updated:

Where the file goes

Netlify serves the contents of your publish directory (the folder set as the deploy output) at the site root. Whatever your framework calls that folder, a llms.txt inside it is served at /llms.txt. You do not need a redirect rule for a real static file.

Method: the publish directory

Put llms.txt where it will end up in the published output for your setup:

  • Next.js, Astro, Vue/Vite, Gatsby: public/ (or static/ for Gatsby) so the build copies it to the output root.
  • SvelteKit, Hugo, Docusaurus: static/.
  • No build (plain HTML): the repository root, and set the publish directory accordingly.

Confirm your publish directory in netlify.toml or the site settings:

# netlify.toml
[build]
  publish = "dist"

Optional: proxy to an external file

If your llms.txt is generated elsewhere (for example by a docs platform), you can proxy the root path to it with a _redirects rule using a 200 rewrite:

# _redirects
/llms.txt  https://docs.example.com/llms.txt  200

Verifying the setup

curl -sI https://yoursite.netlify.app/llms.txt | grep -i content-type
# expect: content-type: text/plain

On another host? See the Vercel and Cloudflare Pages guides. Get the file contents right with the how-to guide and the generator.

Sources