llms.txt for WordPress: a map of your site for AI assistants
An llms.txt file is a plain text list of the most useful pages of a site, written for AI assistants: the name of the site, a short description and links with one line about each. It is a convention that some AI services read. Not all of them do, and it is not a guarantee that your pages appear in their answers. The llms.txt tool of Baza Helper builds the files for you and tells you when they need a fix.
Turn the tool on
- Open Baza Helper > Modules and switch on llms.txt.
- Open Baza Helper > llms.txt, the tab llms.txt and llms-full.txt.
- Choose what goes into the file (below), press Save, then open
/llms.txton your site and read it.
The two files
/llms.txt: the map of the site, with its name, a short description and a link with a line of explanation for each page./llms-full.txt: the same list with the full text of every page. The text is cleaned of markup, scripts and empty lines, so an assistant reads plain text.- On a multilingual site, also
/{language}/llms.txtfor each language.
The files are virtual. You do not create them and nothing is written to the disk. If a real llms.txt file lies in the site root, it wins.
Which pages go in
The list is built from:
- the home page;
- the items of the main menu;
- the post types you choose: Posts, Pages, Docs, Products and Videos, with the number of pages to take from each type.
You can leave pages out by ID. To change one page, use the Entries table: hide the page, give it your own title or write your own line about it. Press Save to keep the changes.
Leave pages out with rules
In the field Leave out (rules) write one rule per line. A rule can be:
- an ID, for example
123; - a piece of an address, for example
-vs-, which leaves out every page whose address contains it; - a category, a tag or a term, with the prefix
cat:,tag:orterm:.
Pages that match a rule are not in llms.txt or llms-full.txt. The field is empty by default.
How many posts
The field How many posts keeps only the newest posts, so a big blog does not fill the file.
For the field Summary, write one to three plain sentences about what your site is.
Section order and your own sections
By default the sections come in this order: Products, Pricing, Quick facts, Services, then the rest. Change the order in Section order.
To make a section of your own, start a line with ## Pricing in a field with links. The lines below it go into that section.
Guides, comparisons and quick facts
The card Guides, comparisons and quick facts adds sections to the file that do not depend on the menu:
- Comparisons and guides and GEO and AI search: one line for each page, in the form
Title | /address/ | description. Each field becomes its own section ofllms.txt. - Quick facts: one fact per line. The lines go into the section
## Quick facts, which gives an assistant short answers about your business.
Pages that are left out automatically
The tool skips what an assistant should not read:
- pages set to noindex in Baza SEO, Yoast, SEOPress or Rank Math;
- thank-you pages;
- addresses that redirect elsewhere;
- pages that are not published.
Speed and caching
The finished text is cached. The files are served with an ETag, so an unchanged file answers 304 Not Modified, with Cache-Control for one hour and a correct Expires header.
Write real files
Tick Write real files llms.txt and llms-full.txt and the plugin writes real files into the site root. The web server, for example nginx, then serves them as text/plain without PHP. A file you made by hand is never overwritten.
Your own text and links
In the section Your own text and links you can write your own introduction, which opens the file, and add your own links to pages or addresses that are not in the list, in the form Title | https://address | description.
Know when the file needs fixing
The first file the site serves is remembered as the reference. After that the tool compares the list with the site.
- A yellow line in the admin bar and the card The file needs fixing appear when a page of the list is gone (deleted, unpublished, private or protected by a password) or when its address changed.
- A new page that would be listed, and a changed title or excerpt, show in the list of changes too (the types new and text), but they do not light the yellow line or play the sound.
Each row says what changed, from what to what. The file already shows the new state, so you do not have to repair anything. Press Accept for one row or Accept all to mark that you have seen the change. The number is counted in the admin; on the pages of the site the last counted number is shown.
Next to it
- Ask AI crawlers to stay away, or let them in, with the helpers on the Helpers tab: Helpers tab: protect e-mail addresses and block AI crawlers in robots.txt.
- The same article covers the protection of e-mail addresses in page text.
Questions
Will it make AI assistants quote my site?
No one can promise that. The file only gives assistants that read it a clear list of your pages.
Does it replace robots.txt?
No. The robots.txt file tells crawlers what they may fetch. The llms.txt file suggests which pages are worth reading. They do different things.
What if I change the address of a page?
The tool notices it and shows the row with the old and the new address, with a yellow line in the admin bar.
