llms.txt V2 on WordPress
llms.txt V2 asks for two things a plain file cannot give on its own: a clean Markdown version of each page, and links in the head that point agents at that copy and at your index. WordPress can do both — one part comes from a plugin, the other from a few lines in functions.php. This guide walks through the whole setup and finishes with a check you can run in seconds.
Published: [FILL IN] · Last modified: [FILL IN]
What you need
Not every V2 feature has a WordPress equivalent. Here is the honest picture before you start, so you know which parts are a small job and which are not worth the effort.
| V2 feature | Can WordPress do it? |
|---|---|
| Root llms.txt | Yes — upload a static file to the site root (Step 1). |
| Markdown versions (page.md / page.html.md) | Not built in, but yes with a plugin that publishes .md copies (Step 2). |
| rel="alternate" type="text/markdown" | Yes — added automatically by a Markdown plugin on the pages it serves (Step 2). |
| rel="describedby" at llms.txt | Yes — a few lines in functions.php or a small site plugin (Step 3). |
| llms.txt in subfolders | Possible, but rarely useful — WordPress URLs seldom map to real folders. Skip it unless you serve directory paths. |
| Optional section | Yes — it is only part of the file, so there is nothing to configure. |
Step 1: Publish llms.txt
Everything else builds on a working llms.txt. The How to add llms.txt to WordPress guide covers generating the file, placing it in your web root so it responds at https://yourdomain.com/llms.txt, and confirming it loads as raw text rather than a 404.
Do that first. A V2 setup with broken link relations is no more useful than a file that does not load at all, and the base file is the one required piece of the whole format.
Step 2: Markdown versions via a plugin
The largest V2 task is publishing a clean Markdown copy of your pages at the URLs the spec defines — page.md or page.html.md. WordPress has no built-in way to do this, so a plugin is the practical route. One option is a plugin such as "One-V LLM Serve", which serves Markdown versions of your content and adds the rel="alternate" type="text/markdown" link to those pages for you.
Before you rely on any plugin, confirm it is actively maintained and compatible with your version of WordPress — check the changelog and recent reviews, and treat a plugin that has not shipped an update in a long time with caution. Current version and maintainer details: [FILL IN]. Plugin menus and option labels change between releases, so read your version's own settings rather than following a fixed click path.
Keep one source of truth for the index. If the plugin also serves /llms.txt, do not also upload a file by hand; if you uploaded a file in Step 1, leave any plugin option that generates one turned off. Two responses at the same URL fight each other and the result is unpredictable.
Step 3: Add describedby with functions.php
The second link relation, rel="describedby", tells an agent which llms.txt describes the page it is reading. Add it to every page's head with one small action. Put the snippet in your child theme's functions.php or a small site plugin so theme updates cannot remove it.
<?php
/**
* Point pages at your llms.txt with a describedby link.
* Add this to a child theme's functions.php or a small site plugin.
*/
add_action( 'wp_head', function () {
echo '<link rel="describedby" href="/llms.txt" />' . "\n";
} );Editing header.php directly also works, but a theme update will overwrite your change; the child theme or a tiny custom plugin is safer. Replacing the hard-coded path with a full URL is fine too — either resolves to the same file.
Step 4: Point llms.txt at your Markdown links
V2 works best when the index itself links to the Markdown versions, so an agent that reads llms.txt is sent straight to clean text. Update the links in your file to use the .md URLs once the plugin is serving them.
# Example Site
> Documentation and guides for the Example platform.
## Docs
- [Getting started](https://example.com/docs/getting-started.md): Install and run in minutes.
- [API reference](https://example.com/docs/api.md): Every endpoint and parameter.
## Guides
- [Best practices](https://example.com/docs/best-practices.html.md): Patterns we recommend.Keep the descriptions as they were; only the link targets change. If a page has no Markdown version yet, leave its original URL in place — a mixed file is fine, and you can move the remaining links across as more pages are covered.
Step 5: Check it with the V2 checker
With the file live, the plugin installed and both link relations in place, run the llms.txt V2 Readiness Checker against one of your content pages. It looks at the llms.txt covering that page, whether a Markdown version is served, and whether the alternate and describedby links are present — then shows the code for anything still missing. Check a docs or article page rather than the homepage, since that is where Markdown copies usually live.
FAQ
Does this help my rankings?
No. llms.txt is a community proposal, not a W3C or IETF standard, and it is not a Google ranking signal. Publishing Markdown versions and link relations makes your content easier for AI tools to read — that is the whole benefit. No traffic or ranking outcome is promised.
What if /llms.txt or the .md URLs return a 404?
A 404 usually means the file is not where the URL expects it, or something in front of WordPress is intercepting the request. Confirm the llms.txt is physically in the web root, then check whether a server rule, a caching layer or a security plugin on a managed host is blocking unknown file types. Managed WordPress hosts vary in how they treat non-standard paths, so test from a clean browser tab after each change.
Is Accept: text/markdown required?
No, that part is optional. V2 does not require your server to return Markdown based on the Accept header. The important pieces are the .md file and the two link relations. Content negotiation — returning Markdown for Accept: text/markdown with a Vary: Accept header — is an extra for servers that support it, and you can add it later without changing anything above.
Check your file
Generate yours free
Learn more
- What is llms.txt?
- llms.txt V2: what changed
- Format & specification
- How to create llms.txt
- Best practices
- Examples & templates
- Do I need llms.txt?
- llms.txt for SEO
- What is llms-full.txt?
- llms.txt vs llms-full.txt
- llms.txt vs robots.txt
- llms.txt in the news
- LLMs.txt Generator
- LLMs-full.txt Generator
- LLMs.txt Validator
- llms.txt V2 Checker
- Robots.txt Generator
- Robots.txt Tester