LLMS.txt Best Practices: What Works and What to Avoid

Keep the file short, curate the links, serve it as plain text, and never promise citations. The best practices for llms.txt, with the evidence behind each one.
Quick answer: Good llms txt practice is simple: keep the file short, list five to fifteen curated links with honest notes, serve it as plain text at the root, and update it when pages change. According to Ahrefs' June 2026 log study of 137,210 domains, 97 percent of llms.txt files got zero requests in May 2026, so write the file for the agents that fetch it, not for citations it cannot deliver.
TL;DR: Short, curated, plain text, kept current. Never keyword-stuff it, never duplicate a sitemap, and never promise citations.
Key takeaways
- Only the H1 with the project name is required, according to the llms.txt specification published September 3, 2024 and revised August 10, 2026.
- Five to fifteen curated links is the right range for most sites, and the whole file should stay under 5 kilobytes.
- Ahrefs found 97 percent of llms.txt files got zero requests in May 2026, across 137,210 domains, according to its June 2026 log study.
- SE Ranking found no correlation between the file and AI citation frequency across about 300,000 domains, according to its October 2026 study.
- Google Search ignores the file for rankings and AI Overviews, according to Google's June 2026 clarification in its AI optimization guide.
- A file that changes when pages change stays useful; a stale file teaches agents to ignore it.
What works in an llms.txt file
The first practice is to keep the file short. A file under 5 kilobytes is easy for any agent to read in one go, and a file that runs to tens of kilobytes is doing the job of the pages it points to. The specification says the file is not meant to replace a sitemap, and the length is where that line shows. If the file lists every page on the site, it has become a sitemap with worse formatting.
The second practice is to curate the links. Five to fifteen pages is the right range for most sites: the home page, the product or service pages, the pricing page, the documentation index, and the contact page. Each link carries a note that says what the page covers and who it is for. A note that repeats the link text or stuffs keywords into it is worse than no note, because it tells the agent nothing about priority.
The third practice is to serve the file correctly. The file must answer with a 200 status code, as text/plain with charset utf-8, with no content-disposition attachment header and no redirect chain. A file that returns a redirect or a download header is invisible to some clients, and the error is silent: the agent simply never reads it. Best AI visibility tracking tools can show whether any system you care about ever fetches the file at all.
The fourth practice is to write the summary first and keep it under 50 words. The blockquote summary says what the project is, who it serves, and what it sells. A summary that runs longer is doing the job of a page, not a map, and an agent that reads the summary should already know whether the site is relevant.
The fifth practice is to use the Optional section for secondary links. Links that matter only sometimes, such as old release notes or a rarely read policy page, belong under a heading titled Optional. By convention, an agent short on context can skip that section entirely, which keeps the main list clean.
Structure that agents understand
The specification fixes the order of the sections, and that order is not a matter of taste. The heading comes first, then the blockquote summary, then detail prose with no headings, then link lists under H2 headings, then the Optional section. A file that puts link lists before the summary makes an agent read links before it knows what the site is.
Group the links the way a reader thinks, not the way the site menu is built. Useful groups are Products, Pricing, Documentation, and Company. Put the most important group first, because an agent short on context reads from the top and may stop early. A group with one link is fine; a group with twenty links is a sign the list is not curated.
Keep the notes honest. A good note says what the page covers in one sentence. A note that promises a page does something it does not do will be found out the first time an agent fetches it, and the file loses credibility. The specification asks for notes because a bare list of links tells an agent nothing about priority.
| Practice | What to do | What to avoid |
|---|---|---|
| Length | Stay under 5 kilobytes, five to fifteen links | Listing every page on the site |
| Notes | One honest sentence per link | Repeating the link text or stuffing keywords |
| Serving | 200 status, text/plain, no redirect chain | Download headers and redirect chains |
| Maintenance | Update the file when pages change | Leaving dead links and stale notes |
| Expectations | Judge it on whether agents use it | Promising citations or rankings |
Maintenance, or why files go stale
A file that is written once and never touched goes stale within months. Pages move, products change names, and pricing pages get replaced. A stale file is worse than no file at all, because it teaches any agent that reads it to distrust the map.
Update the file whenever a linked page changes. The same release process that updates a page should update the note that describes it. A file that changes with the site stays useful; a file that lags the site becomes a source of wrong answers.
Check the links quarterly. Fetch each link in the file and confirm it still resolves to the page the note describes. A link to a page that no longer exists is worse than no link at all, and a link that now points to a different page is worse still.
Check the server behaviour after any site move. A redesign that changes the root path, a migration that adds redirects, or a host that changes content types can all break a file that was fine the week before. Fetch the URL and confirm the status code is 200 and the content type is text/plain. How to measure topical authority covers the kind of regular audit cadence that keeps a file honest.
Watch the server logs for fetchers. According to Ahrefs' June 2026 log study, the largest single reader class was coding agents, with Claude Code fetching more often than any AI retrieval bot in the dataset. If your audience uses coding agents, the file is doing a real job even when no AI search bot ever requests it.
Teams that want help with the wider system can work with an agency. SEO backlinks services cover the citation and visibility work the file cannot do, from earned media to entity clarity.
What to avoid
Do not keyword-stuff the file. The notes are not a place to repeat a target phrase, and the heading is not a place to add a tagline full of keywords. A file written for keyword density is a file written for no reader at all, and it signals that the site is gaming the format.
Do not duplicate a sitemap. The file is a map of a handful of pages with a sentence of context each, not a list of every URL a search engine should crawl. A longer list is a sign the file has become a sitemap, which is not its job.
Do not promise citations or rankings from the file. According to SE Ranking's October 2026 study of about 300,000 domains, only 10.13 percent had an llms.txt file, and the authors found no correlation between having one and how often a domain was cited by AI. When they removed the file from their predictive model, its accuracy improved.
Do not treat the file as a replacement for the things that do move citations. Brand mentions versus backlinks for AI visibility shows that mentions correlate with AI visibility about three times more closely than links do. Coverage, quotes, and data earn citations; a map file does not.
Do not hide the file behind a redirect or a download header. The specification says the file must be served as text/plain with charset utf-8, with a 200 status code and no content-disposition attachment header. A file that a client cannot read is the same as no file.
Do not write the file for Google Search. According to Google's June 2026 clarification in its AI optimization guide, creating an llms.txt file will neither harm nor help a site's visibility or rankings in Google Search, as Google Search ignores them. The guide says you do not need to create new machine readable files, AI text files, markup, or Markdown to appear in Google Search, including its generative AI features.
How to know the file is working
The file is working when the agents that matter to your audience use it. Server logs show the requests: which clients fetch the file, how often, and whether they then fetch the pages it points to. A file with no requests is not failing; it is waiting for an audience that uses agents.
What AI search optimization is explains how the file sits in the wider AI visibility picture.
How to get cited by Perplexity covers the citation work that actually moves, and it is the work the file cannot do.
According to Ahrefs' June 2026 log study of 137,210 domains, 97 percent of llms.txt files received zero requests in May 2026, and AI retrieval bots made about 1.1 percent of the requests that did arrive. According to SE Ranking's October 2026 study of about 300,000 domains, there was no correlation between having an llms.txt file and how often a domain was cited by AI.
Frequently Asked Questions
How often should I update my llms.txt file?
Update it whenever a linked page changes, and check the links at least once a quarter. A file that changes with the site stays useful; a file that lags the site becomes a source of wrong answers.
What is the ideal length for an llms.txt file?
Short. Five to fifteen curated links with one-line notes is the right range for most sites, and the whole file should stay under 5 kilobytes. A longer file is a sitemap, and the specification says the file is not meant to replace one.
Should I include an llms-full.txt file too?
Only if agents ask for it. The main file is the map, and the full file concatenates the site's entire text into one file. Publish the main file first, and add the full file when a client that reads it shows up in the logs.
Can llms.txt hurt my rankings?
No. According to Google's June 2026 clarification, Google Search ignores llms.txt files, and creating one will neither harm nor help a site's visibility or rankings in Google Search, including AI Overviews and AI Mode.
What should I put in the Optional section?
Links that matter only sometimes, such as old release notes or a rarely read policy page. By convention, an agent short on context can skip that section entirely, which keeps the main list clean.
Is llms.txt a Google standard?
No. The file is a proposed convention from llmstxt.org, published September 3, 2024 and revised to version 2 on August 10, 2026. According to SE Ranking's October 2026 study of about 300,000 domains, there was no correlation between having the file and how often a domain was cited by AI.
Expert verdict
Best for: documentation sites and products whose users work with coding agents, where a clean map saves real time.
Not for: anyone buying the file as a citation lever, because the evidence says it does not move citations.
Pros: cheap to write, easy to serve, and useful to the agents that actually fetch it, according to Ahrefs' June 2026 log study.
Cons: almost no AI retrieval bot requests it, and Google Search ignores it, according to Google's June 2026 clarification.
Bottom line
Keep the file short, curate the links, serve it as plain text, and update it when pages change. What AI search optimization is is the wider system the file fits into, and it is where the citation work actually happens.
Sources
The BacklinkPrice Team researches backlink prices, publisher sites and link building tools. We check prices and plans against each provider's own pages and date them, so you know how current the numbers are.
More from BacklinkPrice TeamRelated guides





