llms.txt · AEO · SEO

What is llms.txt and how do you add one to your site?

llms.txt is a markdown file that summarises your site for AI assistants. What goes in it, how I structure mine, and how to add one in Next.js or WordPress.

Mohit Goyal 6 min read
What is llms.txt and how do you add one to your site?

llms.txt is a plain markdown file at the root of a website, at /llms.txt, that gives AI assistants and answer engines a short, factual summary of the site and links to its most important pages. To add one, write a title, a one-paragraph summary, your key facts and a list of main pages with a line each, then serve it from the site root. It is a proposed convention rather than a search engine standard, so treat it as low-cost insurance.

This site has one at mohitgoyal.in/llms.txt. Below is what goes in it, how I structured it, and how to add one on Next.js or WordPress.

What is llms.txt for?

Large language models read websites differently from people. Many AI tools fetch a page and get a wall of navigation, scripts and layout before the content. Some do not run JavaScript at all, so a site that builds its content in the browser can look empty to them.

llms.txt gives them a clean shortcut: a single file in plain markdown that says who runs the site, what it offers and where to read more. The format was proposed in 2024 and has been adopted by a range of documentation sites, tools and personal sites since. Nothing forces an AI system to read it, but when one does, it gets your own words instead of a guess.

Set expectations

llms.txt is not a ranking factor and no major search engine has said it uses the file. I add it because it takes an hour, cannot hurt, and gives any AI tool that does read it accurate facts in my own words.

What should an llms.txt file include?

The proposal suggests a simple structure, and I follow it:

SectionWhat goes in itOn my site
H1 titleThe name of the site, person or companyMy name
Blockquote summaryOne or two sentences on who you are and what you doRole, location, sites shipped, a call to action
Context paragraphHow the file relates to the site and how to use itThat the site is an interactive AI portfolio and this is its plain-text version
Key factsA short list of facts an assistant might be askedRole, location, years of experience, sites shipped, plugin installs, education
Sections as H2sLists of links, each with a one-line descriptionSite sections, services, free AI tools, projects
ContactHow to reach youBooking link, email and profiles

Here is the top of mine, trimmed:

text
# Mohit Goyal

> Senior Web Developer in Gurugram, India. 100+ fast, SEO-friendly sites
> shipped in 4+ years with Next.js, React and WordPress, including the
> procol.ai rebuild. Send me your next project.

## Key facts

- Role: Senior Web Developer, Next.js and WordPress
- Location: Gurugram, India
- Websites shipped: 100+
- Plugin installs: 1,000+

Notice what is missing: no adjectives, no claims I could not back up, and nothing that is not also on the site. Every number in the file appears on a page a person can check, which is what makes it safe for a model to repeat.

The context paragraph matters more than it looks. Mine says the file exists for AI assistants and crawlers that do not execute JavaScript, that everything in it is factual and written by me, and that it can be quoted with attribution. That tells a model how to treat the content.

How do you add llms.txt to a website?

  1. 1

    Write the summary first

    One blockquote that answers 'who is this and what do they offer' in two sentences. It is the part most likely to be quoted.

  2. 2

    List the facts people ask about

    Location, services, experience, prices if you publish them, contact details. Only facts that also appear on the site.

  3. 3

    Map the important pages

    Group links under H2s such as Services, Products, Docs or Case studies, with one line per link. Use full URLs.

  4. 4

    Serve it from the root

    The file must load at yourdomain.com/llms.txt as plain text, with a 200 status.

  5. 5

    Keep it current

    Regenerate or update it whenever a service, product or key fact changes.

On Next.js, the simplest option is a static public/llms.txt. If your pages come from a CMS or content files, a route handler at app/llms.txt/route.ts can build the file from the same data and return it as text, so it updates with the site.

On WordPress, upload the file to the site root through your host's file manager or SFTP, or check whether your SEO plugin offers to generate one. If you write it by hand, add it to your launch and content checklists so it does not drift.

On this site, the descriptions in llms.txt come from the same sources as the pages. Each free tool, for example, has one answer-first summary that appears under the tool's heading, in its JSON-LD and in llms.txt.

Does llms.txt replace robots.txt or a sitemap?

No. Each file does a different job:

  • robots.txt controls who may crawl. Mine explicitly allows AI crawlers such as GPTBot, ClaudeBot, PerplexityBot and Google-Extended, and points to the sitemap. If you block those bots there, llms.txt will not help.
  • sitemap.xml lists every indexable URL for search engines.
  • llms.txt summarises the site and points to the pages that matter most.

Structured data is the fourth piece. JSON-LD on each page gives engines the same facts in a machine-readable form; see my guide to JSON-LD structured data.

What mistakes should you avoid with llms.txt?

  • Pasting whole pages into it. Link to them instead. A long file buries the summary.
  • Facts that disagree with the site. If llms.txt says 100+ sites and the about page says something else, you have taught the model to doubt both.
  • Marketing copy. Write plain statements of fact. A model quoting "the best agency in town" helps nobody.
  • Forgetting it exists. A stale file is worse than none. Generate it, or put it on the update checklist.

Is llms.txt worth adding?

For a business site, yes, as part of a wider effort to be readable by answer engines. It takes about an hour and has no downside. The bigger wins are still server-rendered pages, answer-first writing and consistent facts, which I cover in how to get cited in AI Overviews.

I add llms.txt, structured data and a crawl-friendly setup to the sites I build, and to existing sites through my technical SEO and Core Web Vitals service.

Frequently asked

What is llms.txt?+

A plain text file in markdown at yoursite.com/llms.txt that summarises the site for large language models. It holds a title, a short summary, key facts and links to the most important pages, each with a one-line description.

Does Google use llms.txt?+

Not as far as anyone has shown. Google's AI features draw on its normal search index. llms.txt is aimed at AI assistants and tools that fetch pages directly, and support varies between them.

Is llms.txt the same as robots.txt?+

No. robots.txt tells crawlers what they may fetch. llms.txt tells AI tools what the site is about and where the important content is. You still control AI crawler access in robots.txt.

How long should llms.txt be?+

Short enough to read in a minute or two. Mine runs to a few screens: key facts, services, tools and one line per project. Link to full pages instead of pasting their content.

Can llms.txt hurt my SEO?+

No. It is one extra file that search engines either ignore or read as a normal text page. The only risk is letting it go stale, so its facts disagree with the site.

Mohit Goyal

Written by Mohit Goyal

Senior Web Developer in Gurugram, India. 100+ fast, SEO-friendly sites shipped in 4+ years with Next.js, React and WordPress, including the procol.ai rebuild. Send me your next project.

Keep reading

Let's build

Have a site that needs to be fast, rank and convert?

Open to Work. Usually replies within a day.