Guide · 8 min read

llms.txt Explained: What It Is and How to Write One

A plain-text file at the root of your site that tells AI answer engines what your site is about and which pages matter. Here is what it does, what it does not do, and how to write one properly.

By Buddhika S Weerasekara, Founder & CEO, Applantics (Pvt) Ltd ·

Quick Answer

llms.txt is a Markdown file at the root of your domain that gives AI models a curated summary of your site: who you are, what you do, and which pages matter. It is not a replacement for robots.txt and does not guarantee citations, but it is a low-cost, low-risk signal that takes about an hour to implement correctly.

What llms.txt actually is

llms.txt is a Markdown file placed at the root of a domain, at /llms.txt, that gives large language models a curated summary of what a site is and which pages carry its most useful information. It was proposed in 2024 as a way to help AI systems read a site efficiently, rather than crawling and guessing.

The reasoning is straightforward. A modern web page is mostly navigation, scripts, styling and boilerplate. A language model working from raw HTML spends most of its context on markup that carries no meaning. llms.txt hands over the substance directly: who you are, what you do, and where the real content lives.

What llms.txt is not

It is not a replacement for robots.txt, and it is not an access control mechanism. robots.txt tells crawlers what they may fetch. llms.txt tells models what is worth reading. If you want to block an AI crawler you do that in robots.txt, with a user-agent rule for GPTBot, ClaudeBot, PerplexityBot or whichever agent you mean.

It is also not an official standard adopted by every AI provider. Support varies, and no major engine has committed to reading it as a ranking input. Treat it as a low-cost, low-risk signal that costs an hour to implement, not as a guaranteed route to citations.

What belongs in the file

The format is deliberately simple. An H1 with the site or organisation name, a blockquote giving a one-paragraph summary, then H2 sections containing lists of links with short descriptions. Everything is Markdown, and everything should be written for a reader who knows nothing about you.

The four things worth including

A working example

This is the shape of a well-formed file. Keep the summary tight, make every description earn its place, and never list a URL that redirects or is set to noindex.

# EXAMPLE COMPANY

> Example Company is a Colombo-based accountancy practice specialising in
> audit and tax compliance for small and medium Sri Lankan businesses.

## Key facts

- Founded: 2015
- Legal entity: Example Company (Pvt) Ltd
- Location: Colombo 03, Sri Lanka
- Services: Statutory audit, tax filing, payroll, company secretarial
- Contact: hello@example.lk

## Primary pages

- [Services](https://example.lk/services): Full list of accountancy services
- [Tax filing guide](https://example.lk/tax-guide): How SME tax filing works in Sri Lanka
- [Contact](https://example.lk/contact): Book an initial consultation

The mistake almost everyone makes

The single most common error is letting the file go stale. A page gets retired, redirected or set to noindex, and the llms.txt entry still points at it. You are then actively directing the exact crawlers you want to impress toward a dead URL, which is worse than having no file at all.

Treat llms.txt as part of your deployment checklist. Whenever a page is removed or its URL changes, the file gets updated in the same commit. It takes seconds and prevents the one failure mode that makes the file counterproductive.

How to check it is working

  1. Fetch https://yourdomain.com/llms.txt in a browser and confirm it returns plain text, not a 404 or an HTML error page.
  2. Check the server sends it as text/plain. Some hosts serve unknown extensions as a download, which some fetchers reject.
  3. Click every URL in the file and confirm each returns a 200 and is indexable.
  4. Ask an AI assistant a question your site should answer, and see whether it surfaces you. This is not a controlled test, but repeated over weeks it shows direction.

None of this guarantees a citation. What it does is remove the excuses: if a model does not cite you, it will not be because your site was unreadable.

FAQ

Common Questions

Is llms.txt an official standard?

No. It is a community proposal from 2024 that has been adopted voluntarily by a growing number of sites, but no major AI provider has committed to reading it or treating it as a ranking factor. Implement it because it is cheap and harmless, not because it is required.

Does llms.txt replace robots.txt?

No, they do different jobs. robots.txt controls which crawlers may fetch which URLs and is respected by all major bots. llms.txt describes what your site contains and which pages matter. llms.txt is optional (Google says you don't need AI text files to appear in its AI features), while blocking an AI crawler is always done in robots.txt.

Where should the llms.txt file be placed?

At the root of your domain, so it resolves at https://yourdomain.com/llms.txt. It must be served as plain text with a 200 status. Placing it in a subdirectory means most fetchers will never find it.

How long should llms.txt be?

Short enough to stay accurate. Most sites need between 30 and 80 lines: an identity paragraph, a handful of key facts, and ten to twenty curated links. It is a summary, not a sitemap, so listing every page defeats the purpose.

Will llms.txt help me rank higher on Google?

No. It has no confirmed effect on Google's classic ranking algorithm, since it is read, if at all, by AI language models rather than Google's search index crawler. Its value is entirely in how AI answer engines understand and potentially cite your site, which is a separate outcome from organic ranking position.

Free Audit

Want this checked on your own site?

Run your site through the free SEO checker, or request a full audit reviewed personally by Buddhika S Weerasekara. We also publish documented client results if you want to see the approach applied.

Request Free Audit More Guides

This page is one piece of our SEO service in Sri Lanka. Not sure who to hire? Here is how we rank the best SEO company in Sri Lanka.

Call Now
077 806 4714