A custom website is code your team built, with no platform rules deciding where files can go. That freedom is the whole story here. Nobody will block you from publishing llms.txt at your domain root. The challenge is knowing where your particular stack puts public files, because every framework answers that question a little differently.

An llms.txt file is a short briefing for AI tools, kept at your domain followed by /llms.txt. It starts with your business name and a brief summary, then lists your most important pages with a short note on each. AI assistants read it to describe your business from your best pages, rather than piecing together whatever scattered pages they find.

Find your public folder first

Before writing anything, find where your robots.txt lives in your project. Your llms.txt file belongs in the same place. That is the simplest rule in this guide, and it works across frameworks, because both files need to end up at your domain root when the site is published.

In practice, that place is usually a folder called public or static, or the output folder your static build produces. On a static setup built with Astro, Eleventy, or plain HTML, you drop the file into the published root. On Next.js, the file goes in the public folder and ships with your next deploy, with no extra route to set up. On Vercel, Netlify, and GitHub Pages, the public folder is served as it stands, so a file placed there just works.

Write the file

Draft the file as plain Markdown. Keep the name exactly llms.txt, all lowercase, and commit it with the rest of your project so it survives future deploys. A file that lives only on one person's laptop will vanish the next time someone else deploys.

Here is a fictional bike shop example, to show the layout:

code
# Summit Cycle Works
> Summit Cycle Works sells commuter and gravel bikes, parts, and accessories, with a repair workshop in store and online ordering for pickup or delivery.
## Shop
- [Commuter bikes](https://examplebikes.com/shop/commuter): City bikes built for daily riding, with rack and fender options.
- [Gravel bikes](https://examplebikes.com/shop/gravel): Drop bar bikes for mixed road and trail riding.
- [Parts and accessories](https://examplebikes.com/shop/parts): Tires, lights, locks, and bags for everyday riders.
## Guides
- [Bike sizing](https://examplebikes.com/guides/sizing): How to pick a frame size from height and riding style.
- [Repair services](https://examplebikes.com/guides/repairs): Workshop services, turnaround times, and pricing.
## Policies
- [Shipping and returns](https://examplebikes.com/pages/shipping-returns): Free local pickup and a 30 day return window on unused parts.
## Optional
- [Ride notes](https://examplebikes.com/blog/ride-notes): Route ideas and maintenance tips from the workshop.

Use your own business and your own pages. This example only shows the structure.

Deploy and verify, including headers

Deploy the site, then type your domain followed by /llms.txt into a browser. You should see plain text. Then go one step further and check the headers, which are the technical details your server sends along with the page. The command is:

code
curl -I https://examplebikes.com/llms.txt

Replace the example address with your own domain. Look for a 200 status, which means success, and a text/plain content type, which means the file is served as plain text. If your host serves text files with the wrong type, or forces the browser to download the file instead of displaying it, that is a host configuration setting to fix. The file itself is fine. The server just needs to label it correctly.

The route handler alternative

On any framework, there is a second way to serve the file: a route handler that returns the text with a text/plain content type. Build that only if the file needs to change along with your content, for example by pulling from the same content index the rest of your site uses. For a stable file that changes a few times a year, a plain static file is simpler, easier to review, and easier to keep correct.

Keeping it current

A custom site makes maintenance easy and easy to forget, both at once. The file rides along with your normal deploy process, which is convenient. The risk is that nobody remembers it is part of that process. Move your guides from one address to another and your file keeps linking to the old addresses until someone updates it. A scan will flag those broken links, but the cheaper habit is to add the file to your deploy checklist: whenever a linked page moves, changes, or closes, update the file in the same change and ship it together.

Crawler permissions do not live in this file. They live in robots.txt, which sits beside it in your public folder and is a separate decision. And this file is not a checkout. It briefs AI tools. It does not complete a purchase.

Frequently Asked Questions

Where exactly does llms.txt go on a custom site?

Wherever your stack puts static files, beside robots.txt. That is usually a public or static folder, or the output folder of a static build.

Do I need a route handler to serve it?

Only if the file needs to change with your content, such as pulling from your site's content index. Otherwise a static file in the public folder is enough.

How do I confirm it worked?

Open your domain followed by /llms.txt and check that plain text loads. Then check the headers for a 200 status and a text/plain content type. A download prompt means the host configuration needs fixing.

What happens when I move a page the file links to?

The file keeps pointing at the old address until you update it. Update the file in the same change that moves the page, and deploy them together.

Verified Sources & Technical Documentation

links marked specific point to the page that supports the claim in this guide. Links marked general docs point to the vendor's general docs section for that topic, not to a page that proves every step. Check the vendor docs for the current path before relying on a menu name or click path in this guide.