AEO

llms.txt Implementation: Structure, Descriptions and Grouping

llms.txt implementation is the practice of publishing a plain-text map of your site that AI assistants can read before they fetch individual pages. I put an llms.txt file at the domain root with a short summary, grouped markdown links and one-line descriptions of each destination. It helps a model choose which page to open; it does not replace sitemap.xml or robots.txt, which handle discovery and crawl control.

By Saif Al Jahanwebdev-saif.com

What llms.txt actually is, and what it is not

llms.txt is a proposed convention: a single UTF-8 text file at the domain root that gives AI assistants a curated map of the pages worth reading. The format comes from a community proposal, not a standards body, and no major model provider has promised to consume it. That matters. I treat llms.txt as a cheap, readable hint, never as a ranking lever or a substitute for crawlable HTML. It answers one narrow question: which of these URLs should I open for this query? It does not enumerate every URL, control crawler access or guarantee a citation. I write it for a person reading raw text first and a model second.

  • A proposed convention, not an official web standard
  • Plain UTF-8 text at /llms.txt, readable without JavaScript
  • A curated map for context selection, not a full URL inventory
  • No indexing, ranking or citation guarantee

The file structure, line by line

The de facto format is deliberately small. Start with one H1 holding the site or project name. Follow it with a blockquote of one or two sentences that states exactly what the site offers and who it is for. Then add H2 groups and, under each, one markdown link per page with a colon and a short description. Absolute URLs remove ambiguity about the origin and base path. I keep the whole file under a few hundred lines so it stays cheap to fetch and reason over. Empty groups, nested lists and tables add noise; a flat list of real links is the point.

  • # Site Name as the single H1
  • > A one-sentence summary in a markdown blockquote
  • ## Documentation, ## Services, ## Optional as group headings
  • - [Page title](https://example.com/path): one-line description
  • Absolute https URLs, one entry per line, no nested lists

Writing concise descriptions a model will reuse

The description after each link does the real work. I keep it to roughly 8-20 words, start with a verb or noun that says what the page covers, and avoid adjectives such as comprehensive or best. Where possible I echo the wording of the destination H1 and opening answer, because repeated phrasing strengthens entity association. One line means one claim about one URL. If I cannot describe a page in a single sentence, that page probably needs a clearer purpose before it belongs in the file. For larger documentation sets I also publish /llms-full.txt, the same material concatenated into one document, but the short file stays primary.

  • One line per URL: [title](absolute URL): what the page covers
  • 8-20 words per description, no marketing adjectives
  • Mirror the destination H1 and answer-first intro
  • A second file, /llms-full.txt, for the concatenated long form

Grouping links by task, not by navigation

Groups are how a model decides what to read first. I order them by usefulness for the most likely query: overview and documentation first, services and implementation detail next, secondary material last. A group named Optional, written as ## Optional, is a convention that signals: load this only if you need more context. I reserve it for archives, blog posts and edge-case references. Group names should be plain nouns, three to seven groups in total, with no group holding more than about ten links. If a group keeps growing, split it by intent instead of adding another flat list.

  • Three to seven groups, ordered by likely query intent
  • Plain noun group names: Documentation, Services, Examples
  • ## Optional holds material needed only as extra context
  • Roughly ten links per group maximum; split by intent beyond that

How llms.txt complements sitemap.xml and robots.txt

These three files answer different questions, so removing one because another exists is a mistake. sitemap.xml is an exhaustive XML inventory of canonical URLs with lastmod values; it helps search engines discover and prioritise crawling. robots.txt is an access policy: User-agent, Disallow, Allow and Sitemap directives that tell well-behaved crawlers where they may go. llms.txt is a curated reading list written in prose. It neither enumerates every URL nor grants or denies access. Keep all three. In particular, never block GPTBot, ClaudeBot or PerplexityBot in robots.txt and then expect an llms.txt file to earn citations: a blocked crawler cannot read the map.

  • sitemap.xml: complete URL inventory with lastmod for discovery
  • robots.txt: crawl access policy via User-agent, Disallow and Allow
  • llms.txt: curated, human-readable map for context selection
  • Keep all three; blocking an AI bot in robots.txt defeats llms.txt

Serving and generating the file in a WordPress build

On webdev-saif.com I am Saif Al Jahan, a WordPress and PHP developer in Mymensingh, Bangladesh, and I serve llms.txt from the domain root as UTF-8 text/plain, without authentication, redirects or query-string gating, so any crawler can fetch it with a plain GET. I generate it from the same post and route model that renders the visible pages, then write a physical file on save_post; where the filesystem is locked down I register a rewrite rule and stream the response instead. Either way the links must resolve with 200 responses and use https. I verify the content type with curl -I, check every URL in the file, and confirm the AI user agents are not disallowed.

  • UTF-8 text/plain at https://example.com/llms.txt, no auth or redirect
  • Generate from the content model so links cannot drift from pages
  • Every listed URL returns 200 over https
  • Check content type with curl -I and audit robots.txt user agents

Maintenance and honest measurement

Add llms.txt once, then treat it as a small index that changes when routes change. I regenerate it after adding, renaming or removing a page, and review the group order quarterly against the questions the site actually receives. Measurement is indirect: watch server logs for requests to /llms.txt, track AI referral sessions in analytics, and note when answer engines reproduce our own phrasing. There is no dashboard that proves causation, and I do not claim one. The file is worth keeping because it is cheap to maintain and makes the site legible to machines that do not browse like people.

Frequently asked questions

Does llms.txt replace sitemap.xml?

No. sitemap.xml lists canonical URLs with lastmod values so search engines can discover and recrawl pages. llms.txt is a short prose map that helps an AI assistant decide which pages to read. They solve different problems, and a site should publish both. Removing the XML sitemap because you added llms.txt would hurt discovery, not improve AI visibility.

Is llms.txt an official standard?

No. It is a community proposal, not a W3C or search-engine standard, and no major AI provider has committed to reading it. Adoption is therefore uncertain. I still publish it because the file is cheap, human-readable and forces a useful discipline: every important page gets a clear title, an absolute URL and a one-sentence description. Treat it as documentation hygiene, not a ranking guarantee.

Where does the file go and what format should it use?

Place it at the domain root as /llms.txt, served as UTF-8 text/plain or text/markdown with no redirect. Use a single H1, a blockquote summary, H2 groups and one markdown link per line with a colon and description. Use absolute https URLs. An optional companion file, /llms-full.txt, can hold the full concatenated content, but the short index is the primary file.

How is llms.txt different from robots.txt?

robots.txt is an access policy: User-agent, Disallow and Allow directives tell crawlers which paths they may request. llms.txt is descriptive; it gives no permissions and blocks nothing. A crawler blocked in robots.txt will never reach the map. I keep AI bots allowed where their traffic is welcome, verify that in the server logs, and use llms.txt only to make the allowed pages easier to select.

Do I need llms-full.txt as well?

Only if your site has a bounded documentation set where reading the whole thing in one request is useful. The full file concatenates the pages into a single document, which can be large and costly for a model to process. For a portfolio or marketing site I keep the short /llms.txt index and skip the full version until there is a concrete reason to publish it.

Will adding llms.txt get my site cited by ChatGPT?

Nothing guarantees a citation. llms.txt may make the right page easier to find, but answer engines choose sources from crawlable HTML, entity signals and relevance. I treat it as one small AEO input alongside answer-first content, matching JSON-LD, fast pages and internal links. Check the result through AI referral traffic and mentions, and do not assume the file alone moved the needle.

Written by Saif Al Jahan, webdev-saif.com · Mymensingh, Bangladesh. Last updated .