← All tools

GEO tutorial

How to Add llms.txt to WordPress

The short answer: if you run Yoast SEO or Rank Math, switch the feature on and the plugin writes the file for you. If you use All in One SEO, its LLMs.txt tab does the same. If you run no SEO plugin at all, upload a plain text file named llms.txt to your site root. Whichever route you take, the file must end up at yoursite.com/llms.txt — check it with a validator before you tell anyone it exists.

Free tool

Open the llms.txt Validator

Once your file is live, paste your domain in and get a 0–100 score with a fix for every failed check.

Validate now

First, what llms.txt is — and is not

llms.txt is a proposal, not a formal web standard. It was published in September 2024 as a way for a site to hand AI tools a short, plain-language introduction plus a curated list of its most useful pages, so an AI reader does not have to wade through menus, cookie banners and scripts. Google has said clearly that Search does not use the file — not for ranking, not for AI Overviews, not for AI Mode. Adding one is a low-effort experiment that may help some AI tools understand your site; it is not a ranking lever, and no honest guide should present it as one. Keep that in mind before you spend more than twenty minutes on it.

Method 1: Yoast SEO — flip the toggle

This is the easiest route, and it costs nothing: the llms.txt feature is included in the free version of Yoast SEO. In your WordPress dashboard, go to Yoast SEO, then Settings, then Site Features. Scroll to the AI tools section and find the llms.txt setting. Switch it on and save your changes, and Yoast generates the file for you. By default it picks the pages itself and refreshes the file automatically; if you would rather choose the pages, switch to manual mode, select the pages that matter, and preview the file before it goes live. Then open yoursite.com/llms.txt in a browser tab and confirm the file loads. If it does, you are done — skip the manual method below entirely.

Method 2: Rank Math or All in One SEO

Rank Math ships an llms.txt module you switch on from its dashboard. One detail catches people out: Rank Math leaves the file empty until you configure it, so turning the module on is only half the job. Open the module settings, add your site title and summary, then add the pages you want listed, and save. Visit yoursite.com/llms.txt afterwards and check that the file actually contains your content rather than an empty shell. All in One SEO takes the opposite approach: its llms.txt feature is enabled by default, so your site may already serve a file. You can review and edit it under the LLMs.txt tab in the Sitemaps section of the plugin settings, and switch it off there if you would rather manage the file yourself.

Method 3: Upload the file by hand

If you use no SEO plugin, or your plugin has no llms.txt feature, the manual route takes about ten minutes. Write the file in any plain text editor and save it with the exact name llms.txt — not llms.txt.txt, which is what Windows Notepad produces unless you change the file type to all files when saving. Upload it to your site root with your host file manager or an FTP client, so it opens at yoursite.com/llms.txt. It must sit at the root: a file in a subfolder such as /files/llms.txt is not the same address, and AI tools looking for the standard location will not find it there. If your host does not let you place files at the root, a small code snippet in your child theme's functions.php can serve the file instead — register a rewrite rule that answers requests for /llms.txt with your saved content. Only use the snippet route if you are comfortable editing theme files, and always work in a child theme so an update does not wipe the change.

What to put in the file

The shape is the same whether a plugin or your own hands produced it: one H1 naming the site, one short summary paragraph, then your best pages grouped under H2 sections, each link with a short factual description. If you are writing the file yourself and are not sure where to start, read our guide on how to write an llms.txt file first — it walks through the whole structure with a complete example you can copy. The short version is below; swap in your own pages.

# Example Blog
> A WordPress blog about home baking: tested recipes, technique guides and honest equipment reviews.

## Recipes
- [Sourdough Starter Guide](https://example.com/sourdough-starter): Build and keep a starter alive, day by day.
- [Weeknight Bread](https://example.com/weeknight-bread): A loaf that fits around a working day.

## Guides
- [Choosing a Dutch Oven](https://example.com/dutch-oven-guide): What actually matters when you buy one.

Step 4: Validate the live file

A file that exists is not the same as a file that works. Once it is live at yoursite.com/llms.txt, run it through our free llms.txt validator: enter your domain and it fetches the file, scores it from 0 to 100, and gives a fix for every failed check — a missing summary, a broken link, a duplicate URL, a relative link that points nowhere outside your site. Fix what fails at the source — in the plugin settings or in your text file — and re-check. If you want to understand each check before you fix it, the companion guide on how to validate your llms.txt file explains what the validator tests and why each check matters. Only announce the file once it passes cleanly.

Common pitfalls

Caching. If yoursite.com/llms.txt still shows an old version — or a 404 — after you saved, clear the cache: your caching plugin, your host cache, and your CDN if you use one. Plugin-generated files are often cached aggressively, and a stale copy is the most common reason a correct setup looks broken. Purge, wait a minute, and reload with a hard refresh.

Plugin and manual file fighting. If a plugin feature is on and you also upload a file to the root, one of them wins and it is not always the one you expect. Pick one source, switch the other off, and delete the manual file if the plugin is in charge. The same applies when you switch plugins: turn the old plugin's feature off before the new one takes over, or you can end up serving a file from a plugin you thought you had left behind.

Multisite. On WordPress multisite, an llms.txt feature usually applies per site, not network-wide, and some setups cannot serve a distinct file for each subsite at all. Check each subsite's address individually rather than assuming the main site's file covers the network, and do not promise stakeholders a per-site file until you have confirmed it loads.

Expecting a ranking boost. As noted above, Google Search does not use llms.txt, and no AI company has confirmed it as a standard input to its crawler. Treat the file as a tidy introduction for the AI tools that do read it, keep it accurate as your site changes, and judge it by whether it stays correct — not by whether your rankings move.