An llms.txt file is a short Markdown file at the root of your site that gives AI tools a map of what matters on it. Jeremy Howard of Answer.AI proposed it in September 2024, and it has since turned up on everything from documentation sites to small business blogs.
Adding one to WordPress takes about fifteen minutes. The harder part is deciding what to leave out, and knowing what the file will and will not do for you.
Key takeaways
- llms.txt is a short Markdown map of your site at /llms.txt. One heading, a one-line summary, then sections of links, each with a plain note. arvindkumar.ca
- On WordPress you can upload a file, switch on an SEO plugin setting or generate it from code. A real file in the site root wins over anything WordPress generates. arvindkumar.ca
- Keep expectations in proportion: Google says its AI search features do not need the file, while Chrome’s Lighthouse now checks for one in its audits for AI agents. arvindkumar.ca
- Check that the file loads as plain text with a clean response, and keep it current. A stale map is worse than none. arvindkumar.ca
Written by a person, formatted for answer engines.
What goes in an llms.txt file?
A title, a one-line summary and a few lists of your most useful pages. The proposal at llmstxt.org asks for an H1 with the site’s name (the only required part), a short summary in a blockquote, then any number of H2 sections, each a list of links with a short note after a colon. A section called Optional holds pages a tool can skip when it is short on space.
# Example Studio
> A small web studio that builds and looks after WordPress sites for local businesses.
## Guides
- [How we test plugins](https://example.com/blog/testing/): our end-to-end testing routine
- [Choosing a host](https://example.com/blog/hosting/): what to check before you move
## Optional
- [About](https://example.com/about/)
There is a companion, llms-full.txt, that puts the full text of every listed page into one file. It suits documentation sites; for most WordPress sites the short map is enough.
How do you add llms.txt to WordPress?
Pick one of three ways: a file you upload, a setting in your SEO plugin, or a few lines of code that build the file from your content. Before you start, have a list of the ten to twenty pages you would hand a new colleague to explain what you do.
- Upload a file. Write the file in a text editor, name it llms.txt and upload it to the folder that holds wp-config.php, with SFTP or your host’s file manager. Open yoursite.com/llms.txt: you should see your text, not a WordPress page.
- Or switch it on in your SEO plugin. In Yoast SEO it is under Yoast SEO, Settings, Site features, AI tools, LLMS.txt; turn it on, choose your pages under the manual selection and save. Rank Math has a similar option. Read what it generates before you leave it on: plugin descriptions tend to be generic.
- Or generate it from code. This is what I do on my own site: the theme builds the file from the site’s content when it is requested, so it never goes stale. A minimal version for a plugin or a child theme’s functions.php is below. After adding it, open Settings, Permalinks and click Save once so WordPress picks up the new rule.
add_action( 'init', function () {
add_rewrite_rule( '^llms\.txt$', 'index.php?my_llms=1', 'top' );
} );
add_filter( 'query_vars', function ( $vars ) {
$vars[] = 'my_llms';
return $vars;
} );
add_action( 'template_redirect', function () {
if ( ! get_query_var( 'my_llms' ) ) {
return;
}
header( 'Content-Type: text/plain; charset=utf-8' );
echo '# ' . html_entity_decode( get_bloginfo( 'name' ), ENT_QUOTES ) . "\n\n";
echo '> ' . html_entity_decode( get_bloginfo( 'description' ), ENT_QUOTES ) . "\n\n## Pages\n\n";
foreach ( get_pages( array( 'sort_column' => 'menu_order' ) ) as $page ) {
echo '- [' . html_entity_decode( get_the_title( $page ), ENT_QUOTES ) . '](' . get_permalink( $page ) . ")\n";
}
exit;
}, 1 ); // Before WordPress adds a trailing slash to the address.
One thing to know: if a real llms.txt file sits in the site root, the web server sends that file and WordPress never sees the request. Pick one method and remove the others.
What should you expect from llms.txt?
Not rankings. Google has been consistent on this: Gary Illyes said in July 2025 that Google does not support llms.txt and is not planning to, and Google’s own guide to optimising for AI search, published in May 2026, lists it among the things its AI features do not need.
The picture is different for AI agents. In May 2026, Lighthouse 13.3 added an Agentic Browsing category to Chrome’s site audits, with an llms.txt check among them. Its documentation calls the file an emerging convention that can save agents time crawling your site. A missing file is marked not applicable; a server error is flagged.
So my view stays the same: llms.txt is cheap and harmless, a courtesy for tools and agents, not a lever for search. The work that gets you cited is still pages that answer real questions in plain HTML, which I wrote about in what AI search taught me about SEO, AEO, GEO and CRO.
What mistakes should you avoid?
- Listing every URL. That is what your sitemap is for; llms.txt should be a short, chosen list.
- Writing marketing copy. Each note should say plainly what the page answers.
- Linking pages you keep out of search on purpose. If a page is private or set to noindex, leave it out of the file too.
- Uploading a file once and forgetting it. A static file goes stale every time you publish or retire a page.
How do you check that it works?
- Open yoursite.com/llms.txt in a private window. You should see plain text, not a themed page or a login screen.
- Check the headers with
curl -I https://yoursite.com/llms.txt. Look for a 200 status and a text/plain content type. - Click a few links in the file. Every one should open a live page, not a redirect or a 404.
- If you use a page cache or a CDN, clear it after each change and check again.
Then put a reminder in your calendar to reread the file every few months, or let code build it so you never have to. Fifteen minutes now, and a quick look each quarter, is all llms.txt asks for.
Access mine: https://arvindkumar.ca/llms.txt
