A self-hosted site is one where you control the server: the file system, the web server settings, and the deploy process. That control makes publishing llms.txt simple in theory. Put the file in your web document root and it appears at your domain followed by /llms.txt. In practice, the work is checking that the server hands it out correctly, because with no platform in between, every failure mode is yours to find and fix.
An llms.txt file is a short briefing for AI tools. It opens with your business name and a brief summary, then lists your key pages with a short note on each. AI assistants use it to describe your business from your best pages, instead of guessing from scattered listings.
Where the file goes
Your document root is the folder that holds your site's index file, the same directory as index.php or index.html, wherever your virtual host points. Common names for it are public_html or /var/www/html, but your setup may differ, so trust your virtual host setting over any example name. Place llms.txt there, beside the index file, not in a subdirectory and not in a staging folder that looks similar.
Upload it with SFTP or your host's file manager, and set the permissions to 644, so the web server can read it. If you deploy through git or a pipeline, commit the file into your repo instead, so the next deploy does not wipe it out. A file that lives only on one machine is a file waiting to disappear.
Here is a fictional coffee roaster example, to show the layout:
# Stonebridge Coffee Roasters
> Stonebridge Coffee Roasters roasts small batch coffee in a neighborhood roastery, selling beans online and in store, with subscriptions and brewing classes.
## Shop
- [Single origin beans](https://examplecoffee.com/shop/single-origin): Single origin beans with tasting notes and roast levels.
- [Blends](https://examplecoffee.com/shop/blends): House blends for espresso and filter brewing.
- [Subscriptions](https://examplecoffee.com/shop/subscriptions): Recurring bean deliveries with flexible timing and grind options.
## Guides
- [Brewing guides](https://examplecoffee.com/guides/brewing): Pour over, French press, and espresso methods with ratios.
- [Classes](https://examplecoffee.com/guides/classes): In store brewing classes, dates, and booking details.
## Policies
- [Shipping and returns](https://examplecoffee.com/pages/shipping-returns): Shipping options and returns on unopened bags.
## Optional
- [Roastery notes](https://examplecoffee.com/blog/roastery-notes): Notes on new origins and roast profiles.
Use your own business and your own pages. This example only shows the structure.
Verify it properly, not just in the browser
Type your domain followed by /llms.txt into a browser first. Seeing the text is a good start, but it is not a full check. Then check the headers, which are the technical details your server sends with the page, using this command with your own domain:
curl -I https://examplecoffee.com/llms.txt
Look for a 200 status and a text/plain content type. Those two details are what a proper check confirms. If the browser offers the file as a download instead of displaying it, the content type setting is the fix, not the file.
The four failures that look like "the file is there"
Self-hosted setups produce a familiar complaint: the file is in place, but the check fails. Almost always, one of four server side issues is behind it.
First, the wrong folder. The file landed in a staging virtual host's document root, or in a subdirectory, instead of the production web root. The browser check on the live domain then finds nothing, even though the file exists somewhere on the server.
Second, the wrong content type. The server sends the file labeled as something other than plain text, so tools that expect plain text mishandle it. On Apache, adding a line for text files to your site configuration fixes this. On nginx, the default types map usually covers text files already, so check there only if the headers look wrong.
Third, a stale cache. A page cache, content delivery network, or proxy in front of your server keeps serving the old version after you update the file, or keeps serving a 404 from before the file existed. Purge or bypass the cache for /llms.txt whenever you update the file. Otherwise you will stare at the old version and conclude, wrongly, that the upload failed.
Fourth, permissions. If the web server cannot read the file, it cannot serve it. The 644 permission setting above covers this in most setups.
Each of these is a server setting, not a file edit. Once you work through the layers, the file itself is usually fine.
Use your logs, an advantage hosted platforms lack
Because you own the server, you also own the access logs, and that is a real advantage. Filter those logs for requests to /llms.txt and you can see which crawlers are actually fetching the file. Look for user agents like GPTBot, ClaudeBot, or PerplexityBot in the log lines. That list is the only solid evidence of whether anyone is reading the file at all. Everything else is assumption.
Crawler permissions are a separate file. They live in robots.txt, not in llms.txt, and tuning them is a separate job from publishing this briefing file. Keep the two apart and both stay correct.
Frequently Asked Questions
The file is on the server but the check fails. What is wrong?
Usually a server setting, not the file. Work through the layers: wrong folder, wrong content type, stale cache, or permissions blocking the web server from reading it. Check the headers to narrow it down.
What permissions should the file have?
644. That lets the web server read it while keeping it unchangeable by casual visitors.
I updated the file but still see the old version. Why?
A cache in front of the server, such as a page cache, content delivery network, or proxy. Purge or bypass it for /llms.txt when you update the file.
How can I tell whether anyone actually reads the file?
Filter your access logs for requests to /llms.txt and look for crawler user agents such as GPTBot, ClaudeBot, or PerplexityBot. Those log lines are the real measurement.
Verified Sources & Technical Documentation
- llms.txt proposal Specific https://llmstxt.org
- RFC 9309, Robots Exclusion Protocol General Docs https://www.rfc-editor.org/rfc/rfc9309.html
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.