How to Write an LLMS.txt File for AI Citations in 2026

An llms.txt file is a short Markdown map of your site: one heading, a summary, and curated links. The format is simple, but the evidence on who reads it is sobering.
Quick answer: To write an llms txt file, publish a short Markdown file at yoursite.com/llms.txt with one heading for the project name, a blockquote summary, and link lists under H2 headings. According to the specification at llmstxt.org, only the heading is required. The file is a proposal, not a standard, and no search engine has said it uses the file to choose sources.
TL;DR: One heading, one summary, curated links. Publish it at the root, serve it as plain text, and keep it short. Do not expect citations from it.
Key takeaways
- The llms.txt proposal comes from Jeremy Howard of Answer.AI, published September 3, 2024 and revised to version 2 on August 10, 2026, according to the specification.
- Only the H1 with the project name is required, according to the specification; everything else is optional.
- 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.
- The file still has a job: it gives agents and coding assistants a clean map of a site, which is what the version 2 spec is written for.
What llms.txt is
An llms.txt file is a short Markdown file at the root of a website that tells an AI agent what the site is, which pages matter, and which ones to skip. The proposal comes from Jeremy Howard of Answer.AI, published on September 3, 2024 and revised to version 2 on August 10, 2026. The specification lives at llmstxt.org, and it describes the file as a proposal to standardise on using an llms.txt file to help agents use a website.
The file is a map, not a sitemap. A sitemap lists every URL a search engine should crawl. An llms.txt file lists a handful of pages with a sentence of context each, so an agent can decide what to read without fetching everything. The specification says plainly that the file is not meant to replace a sitemap.
The name recalls robots.txt, which is why the two get confused, but the function is entirely different: a robots.txt file is an access file that says which crawler may fetch which path, while an llms.txt file is a description file that grants nobody anything and only describes content. What AI search optimization is explains where the file sits in the wider AI visibility picture.
The format, in order
The specification fixes the order of the sections, and that order is not a matter of taste. It is the structure whatever parses the file expects to find. The table below lists the parts in order.
| Part | What it is | Required? |
|---|---|---|
| H1 title | One line with the name of the project or site | Yes, the only required part |
| Blockquote summary | A short summary with the key facts needed to understand the rest | Optional |
| Detail prose | Paragraphs or lists with more background, no headings here | Optional |
| H2 file lists | Sections of links, each with a name, a URL, and a note | Optional |
| Optional section | A section titled Optional, for secondary links an agent may skip | Optional |
The H1 carries the full name of the project or site, not a tagline. The blockquote summary carries whatever is needed to make sense of the rest: what is sold, to whom, and where. The detail prose holds facts that change how the links should be read, such as units of measurement or sales channels.
Each file list entry is a Markdown link followed by a colon and a short note on what the page covers. The note is the valuable part: the link tells an agent where it could go, and the note tells it whether going there is worth the request. AI citations versus backlinks explains why that kind of signposting matters to the systems that read pages.
Two companions sit beside the main file. An llms-full.txt file concatenates the whole site text into one file, so a model can read it without following a single link. The version 2 spec also recommends a clean Markdown version of each page, at the same URL with a .md suffix, so the index stays small and the detail is fetched only when needed.
Write it step by step
Start with an inventory, not a draft. List the pages an agent would need to answer a question about your site: the home page, the product or service pages, the pricing page, the documentation index, and the contact page. Five to fifteen pages is the right range for most sites. A longer list is a sign the file is becoming a sitemap, which is not its job.
Draft the heading and the summary first. Write the project name in full, then one or two sentences that say what it is, who it serves, and what it sells. Keep the summary under 50 words. A summary that runs longer is doing the job of a page, not a map.
Group the links under H2 headings that match how a reader thinks, not how your 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.
Write one honest note per link. A good note says what the page covers and who it is for, in one sentence. A bad note repeats the link text or stuffs keywords into it. The specification asks for notes because a bare list of links tells an agent nothing about priority.
Add an Optional section for the rest. 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.
Publish the file at the root, at yoursite.com/llms.txt, as a plain text file. The specification also allows files in subpaths, such as /docs/llms.txt, that describe only the pages under that path. Where more than one file applies, an agent should use the most specific one.
Serve it correctly, then check it
The file must answer with a 200 status code. A redirect chain makes the file invisible to some clients, so publish it at the exact path the spec names. The content type must be text/plain with charset utf-8, or non-ASCII characters break. There must be no content-disposition attachment header, which marks the file as something to download rather than read.
Check the file the way a client would. Fetch the URL in a browser and confirm the text renders as plain text. Fetch it with a command line tool and confirm the status code is 200 and the content type is text/plain. Open it and confirm the links resolve: a link to a page that no longer exists is worse than no link at all.
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. Best AI visibility tracking tools can show whether any of the systems you care about ever fetch the file at all.
Who actually reads it
The honest answer is: fewer systems than the hype suggests. According to Ahrefs' June 2026 log study of 137,210 domains, 28 percent published an llms.txt file, and 97 percent of those files received zero requests in May 2026. Of the requests that did arrive, 96 percent came from bots, and AI retrieval bots made about 1.1 percent of them.
The largest single reader class was coding agents. According to the same Ahrefs study, Claude Code fetched llms.txt files more often than any AI retrieval bot in the dataset. GPTBot accounted for 4.51 percent of the requests that arrived, ClaudeBot for 0.80 percent, and DeepseekBot for 0.02 percent.
Google Search does not read it for rankings. 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.
Chrome's Lighthouse tool does check for the file. In May 2026, Lighthouse version 13.3 added an llms.txt audit to its Agentic Browsing category. That audit checks whether the file exists and flags server errors when retrieving it. It is a browser-agent check, not a search check, and the two measure different things.
What to expect from the file
Expect the file to help agents that are pointed at your site, not to move citations. A coding assistant that reads your documentation, a research agent that maps a site before answering, or a support agent that needs the right page quickly can all use the map. None of those readers decides which sources an answer cites.
Do not expect citations 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.
How to earn backlinks is a better use of the same afternoon if citations are the goal, because earned links and earned mentions come from coverage and data, not from a map file. Publish the llms.txt file if agents matter to your audience, and judge it on whether agents use it, not on whether citations move.
Teams that want the citation work done properly can work with an agency. SEO backlinks services cover the earned media, quotes, and data work that moves citations, while the file stays a map for agents.
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
What goes in an llms.txt file?
A heading with the project name, a blockquote summary, and link lists under H2 headings, each link with a short note. According to the specification, only the heading is required. An Optional section holds secondary links, and an llms-full.txt file can carry the full site text.
Where do I put the llms.txt file?
At the root of the site, at yoursite.com/llms.txt. The specification also allows files in subpaths, such as /docs/llms.txt, that describe only the pages under that path. Where more than one file applies, an agent should use the most specific one.
Does Google use llms.txt for AI Overviews?
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.
How long should an llms.txt file be?
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.
What is llms-full.txt?
It is the companion file that concatenates the site's entire text into one file, so a model can read it without following a single link. The main file is the map; the full file is the territory. Publish the main file first, and add the full file only if agents ask for it.
Do I need an llms.txt file for AI citations?
No. 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. Publish one for agents that navigate your site, not for citations.
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
Write a short, honest map, serve it as plain text at the root, and judge it on whether agents use it. E-E-A-T and backlinks explained covers the quality signals that actually move how AI systems treat your pages.
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





