Technical SEO for AI Search · How to

llms.txt example and generator: build yours in 30 minutes

Part of the guide Technical SEO for AI search: the 2026 checklist, in order

To build an llms.txt file, write an H1 with your site name, a one line blockquote summary, then H2 sections that list your key pages as markdown links with a short note each, and save it as /llms.txt at your site root. A small script can draft it from your sitemap; WordPress sites on Yoast SEO can switch on a built in generator. Edit the draft by hand before publishing.

What does a good llms.txt look like?

A good file is short, specific and true on the day you publish it. It names the site, says what it does and for whom, points to 5 to 30 pages that answer real questions, and states what the business does not do. Here is the real file we serve at www.postbing.com/llms.txt, trimmed for length (accessed 16 November 2026):

llms.txt is the last and optional item in our technical SEO for AI search checklist, so do it after the checks that affect crawling.

# Postbing

> Postbing is an SEO and AEO autopilot for small businesses and agencies. It reads a website, plans a month of article topics from what customers search for, writes each article in the site's own voice and publishes it to WordPress, Shopify, Webflow, Ghost, a webhook or a Postbing-hosted blog. It does not build backlinks: no link exchanges, no link networks and no hidden links in customer articles.

## What it will not do
- No backlink exchanges, link networks, paid links or hidden links to Postbing.
- No ranking, traffic or AI-citation guarantees.

## Pricing
- Launch: $49 a month, or $490 a year. 30 articles a month, 1 site.
- First article free, no card. Cancel in one click from Billing.

## Key pages
- [Pricing](https://www.postbing.com/pricing): plans, included articles and FAQ.
- [Postbing vs Outrank](https://www.postbing.com/vs/outrank): an honest, sourced comparison.
- [Webhooks for developers](https://www.postbing.com/docs/webhooks): connect any site with signed JSON deliveries.

## Contact
- support@postbing.com (a person replies within 24 hours).

Three things make it useful. The summary names the product category and the publishing targets, so an agent can match it to a question like "which tool publishes to Ghost". The "will not do" section answers the objection buyers ask about. Every link has a note that says what the page contains, not a slogan.

If you are unsure what the format is for in the first place, read what llms.txt is and what it does not do first.

Two more templates: a local business and a docs site

The structure stays the same; the sections change with what people ask about you.

A local service business (fictional example, replace every detail):

# Northside Plumbing

> Licensed plumber serving Leeds and Bradford. Emergency call outs 24 hours a day, boiler servicing, bathroom fitting.

## Services
- Emergency plumber: call out times, areas covered, what an emergency visit costs.
- Boiler service: what is checked, how long it takes, price.

## Areas
- Areas we cover: list of towns and postcodes.

## Optional
- About us: team, licences, insurance.

A software documentation site (fictional example):

# Acme API

> REST API for sending invoices. Base URL  Auth by bearer token.

## Docs
- Quickstart: create a key and send a first invoice.
- Authentication: token scopes, rotation.
- Errors: every error code with a fix.

## Optional
- Changelog: dated list of API changes.

The docs example links to .md copies of pages. That is part of the v2 proposal on llmstxt.org and matters most for docs, where agents read the pages themselves.

How do you generate llms.txt from your sitemap?

The fastest honest draft comes from your own sitemap: one link per URL, using each page's title tag and meta description as the note. The Python script below does that with the standard library only. We ran it against postbing.com on 16 November 2026 and it produced a correct draft of 13 links in a few seconds.

import html, re, sys, urllib.request
import xml.etree.ElementTree as ET

SITE, NAME, SUMMARY = sys.argv[1].rstrip("/"), sys.argv[2], sys.argv[3]
LIMIT = 40
NS = {"s": "http://www.sitemaps.org/schemas/sitemap/0.9"}

def get(url):
    req = urllib.request.Request(url, headers={"User-Agent": "llms-txt-builder/1.0"})
    with urllib.request.urlopen(req, timeout=20) as r:
        return r.read().decode("utf-8", "replace")

def find(pattern, text):
    m = re.search(pattern, text, re.I | re.S)
    return html.unescape(m.group(1)).strip() if m else ""

root = ET.fromstring(get(SITE + "/sitemap.xml"))
urls = [loc.text.strip() for loc in root.findall("s:url/s:loc", NS)]

out = ["# " + NAME, "", "> " + SUMMARY, "", "## Pages", ""]
for url in urls[:LIMIT]:
    page = get(url)
    title = find(r"<title[^>]*>(.*?)</title>", page) or url
    desc = find(r'<meta\s+name="description"\s+content="([^"]*)"', page)
    out.append(f"- [{title}]({url}): {desc}" if desc else f"- [{title}]({url})")

print("\n".join(out))

Run it like this, then edit the output:

python3 build_llms_txt.py https://www.example.com "Example Ltd" "One sentence on what you do and for whom." > llms.txt

Limits you should know before trusting the draft:

  1. Sitemap index files. If your /sitemap.xml is an index that points to other sitemaps, the script finds no <url> entries. Point it at one child sitemap, such as /post-sitemap.xml.
  2. Meta tag order. The description pattern expects name before content. If your theme writes them the other way round, the note is left empty and you fill it in.
  3. It lists everything. A sitemap includes legal pages and thin tag pages. Delete them, group the rest under headings such as "Product", "Pricing", "Guides", and move secondary links to "Optional".
  4. Titles carry brand suffixes. Strip "| Brand" from link text so the file reads cleanly.

How do you generate llms.txt on WordPress?

On WordPress, Yoast SEO has a built in generator. Yoast's help page gives the path: Yoast SEO, then Settings, then Site features, then under AI tools select LLMS.txt, toggle it on and click Save changes. Yoast's developer specification says the file "will be updated weekly by a scheduled action" and by default includes "the 5 latest updated posts/pages/custom post types" (only posts published in the last 12 months) plus the 5 categories or tags with the most content.

Two catches from the same specification. If a physical llms.txt already exists on the server, Yoast does not overwrite it, so you must delete the old file first. And five recent posts is not the same as your five most useful pages, so use the manual page selection option if your best pages are older.

Method Effort Keeps itself current Best for Watch out for
Write by hand 30 to 60 minutes No Sites under about 50 pages Forgetting to update prices
Sitemap script (above) 10 minutes plus editing Only if you rerun it Any site with a flat sitemap Lists low value URLs
Yoast SEO llms.txt feature A few clicks Weekly, per Yoast WordPress sites already on Yoast Defaults to 5 latest items
Generated by your blog platform None On publish, if supported Hosted blogs Check what it includes

Blogs hosted on Postbing get an llms.txt and an llms-full.txt generated for them, so that row applies if you use our hosted blog. It does not apply to WordPress or Shopify sites we publish to; those use whatever your CMS or plugin serves.

What should you check before publishing?

Check four things: it loads, it is plain text, every link works, and every fact matches the live page. Use these commands:

curl -sI https://www.example.com/llms.txt | grep -iE "^(HTTP|content-type)"
curl -s https://www.example.com/llms.txt | grep -oE "\(https?://[^)]+\)" | tr -d "()" | xargs -n1 curl -s -o /dev/null -w "%{http_code} %{url_effective}\n"

The first should print a 200 and a text/plain or text/markdown content type. The second prints a status for every link; anything that is not 200 needs fixing or removing. Then read the file next to your pricing page. A stale price in llms.txt is the most common way this file does harm.

Last, confirm the bots that might fetch it are not blocked: a file nobody is allowed to read does nothing. The curl test for AI crawler access covers that, and our technical SEO for AI search checklist puts llms.txt in context with the work that matters more, such as an accurate sitemap (how to submit one to Google).

FAQ

Is there a free llms.txt generator?

Yes. The Python script on this page is free and uses only the standard library. On WordPress, Yoast SEO includes an llms.txt feature you switch on under Settings, Site features, AI tools.

How long should llms.txt be?

Short enough to read in a minute. Most small sites need 5 to 30 links. Put secondary pages under an "Optional" heading so agents with little context can skip them.

Should llms.txt include prices?

Only if you will update it whenever prices change. A wrong price in llms.txt can be repeated by an agent, so many sites link to the pricing page instead.

Will Yoast overwrite my existing llms.txt?

No. Yoast's specification says it does not overwrite a physical llms.txt file. You must remove the existing file from the server before Yoast can generate one.

Does publishing llms.txt improve Google rankings?

No. Google's AI optimization guide says Google Search ignores llms.txt and that the file neither helps nor harms rankings.

Sources

Last updated: November 16, 2026. Spotted an error? Email support@postbing.com and we will fix it. Editorial policy.

Try Postbing free

Postbing reads your site, plans a month of topics from what your customers search for, writes in your voice and publishes to WordPress, Shopify, Webflow or Ghost. Your first article is free.

Try Postbing free

No card needed. No link exchanges, ever.