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 and how to add one in Next.js or WordPress.

Mohit Goyal7 min readUpdated 2 Nov 2026
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. Nothing forces an AI system to read it, but when one does, it gets your own words instead of a guess. Don't expect it to move search rankings: Google's guidance on AI features says you don't need new AI text files or Markdown to appear in them.

Set expectations

llms.txt is not a ranking factor, and Google says its AI features don't need it. I add it because it is a small job, 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.
> 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. A minimal version looks like this:

ts
// app/llms.txt/route.ts
import { services } from "@/content/services";

export const dynamic = "force-static";

export function GET() {
  const lines = [
    "# Your Name",
    "",
    "> One or two sentences on who you are and what you offer.",
    "",
    "## Services",
    "",
    ...services.map(
      (s) => `- [${s.title}](https://example.com/services/${s.slug}): ${s.summary}`
    ),
  ];

  return new Response(lines.join("\n"), {
    headers: { "Content-Type": "text/plain; charset=utf-8" },
  });
}

Because the service titles and summaries come from the same content file as the service pages, the two can't drift apart. force-static builds the file once at deploy time, so it costs nothing to serve.

On WordPress, upload the file to the site root through your host's file manager or SFTP, or use an SEO plugin that generates one, such as Yoast SEO's llms.txt feature. If you write it by hand, add it to your launch and content checklists so it does not drift. If your summary starts life in Google Docs or Word, the free Markdown Converter turns it into clean Markdown, and once the file is live the free AI Crawler Checker confirms it loads and shows which AI crawlers your robots.txt lets in.

Ideally, generate each description from the same source as the page, so the summary under a page's heading, its JSON-LD and its line in llms.txt never disagree.

Related guide: Cloudflare blocking AI crawlers? How to let ChatGPT in

What is llms-full.txt?

llms.txt is a map. llms-full.txt is an optional companion file that holds the content itself: the full text of your key pages in one markdown document, so an AI tool can read everything without following dozens of links.

My llms.txt links to an llms-full.txt that holds the full text of every case study summary, service, free tool page and blog post. The short file stays readable in a minute or two; the long one is there for tools that want depth.

If you add one, follow the same rules: generate it from the same content as the pages, keep the headings clear, and strip navigation, cookie banners and anything that isn't content. A large file is fine here, because its job is completeness, not a quick summary. Link to it from llms.txt so tools can find it.

Related guide: How to get your website cited in AI Overviews and ChatGPT

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

No. Each file does a different job:

  • robots.txt controls who may crawl. Check that it allows the AI crawlers you want, such as GPTBot and ClaudeBot, and points to your 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. For most sites it is a short job, often an hour or two, and it has no real downside. The bigger wins are still server-rendered pages, answer-first writing and consistent facts across the site.

If you want this done properly, I add or review llms.txt, robots.txt and JSON-LD as part of my technical SEO and Core Web Vitals service, on new builds and existing sites. Book a 20-minute call or send me your site and I'll tell you what's missing.

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?+

Google's Search Central guidance on AI features says you don't need to create new AI text files or Markdown to appear in them, and those 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

How to get your website cited in AI Overviews and ChatGPT

Answer engines quote pages they can crawl, understand and trust. The AEO and GEO practices I use: answer-first copy, question headings, schema and llms.txt.

8 min read

How to write an SEO content brief (free template)

An SEO content brief sets the query, intent, outline and sources before writing. Copy my free template and see a filled example, or generate one free.

12 min read

Let's build

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

Open to Work. Usually replies within a day.