<!-- Generated from llms-txt-netlify/index.html. The canonical document is the HTML page. -->

- [ Home ](/) 
/
- [ How to create llms.txt ](/how-to-create/) 
/
- Netlify            
# 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: July 26, 2026

## 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"

```

✓ Let the framework place it

Do not drop the file directly into  dist/  by hand: it gets wiped on each build. Put it
in your framework&rsquo;s static source folder so every build re-emits it.

## 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](/llms-txt-vercel/) and
[Cloudflare Pages](/llms-txt-cloudflare/) guides. Get the file contents right with the
[how-to guide](/how-to-create/) and the [generator](/generator/).

## Sources

- [ Netlify docs, framework support and publish directory ](https://docs.netlify.com/build/frameworks/overview/)
- [ llmstxt.org, spec reference ](https://llmstxt.org/)           
On this page

- [ Where the file goes ](#overview)
- [ Method: the publish directory ](#publish)
- [ Optional: proxy to an external file ](#proxy)
- [ Verifying the setup ](#verify)
