A few months ago I got an email from a reader who ran a small WordPress blog about home gardening. She wanted to add an llms.txt file to her site, but every tutorial she found started with “install Yoast SEO and flip this switch.” Her site already ran another SEO plugin, and she had no plan to swap it out just for one text file. She asked me a simple question: can I do this without Yoast?

You can. Honestly, you don’t need any particular plugin for this. An llms.txt file is just a plain text file written in Markdown that sits at the root of your site, like robots.txt does. If you can create a file and upload it, you can have one live in about twenty minutes. In this guide I’ll walk you through four ways to set it up, show you a ready-to-use sample, and tell you plainly what the file can and can’t do for you. No hype, no magic promises.
What llms.txt Actually Is (and What It Isn’t)
Let’s clear the fog first, because there’s a lot of confusion floating around.
The basic idea
llms.txt is a proposal that Jeremy Howard of Answer.AI put forward in September 2024. The idea is simple. Large language models, the tech behind chatbots and AI assistants, have a hard time reading modern websites. Pages are stuffed with menus, popups, tracking scripts, sidebars and cookie banners. The useful content is buried somewhere in the middle.
So the proposal says: give the models a clean, short, human-readable map of your site. Put it at yoursite.com/llms.txt. Write it in Markdown. Tell the reader who you are, then list your most important pages with a one-line description for each.
That’s it. It’s closer to a well-organised welcome note than a technical protocol.
The format has a few parts, and the order matters:
- An H1 with the name of your site or project (this is the only required part)
- A short summary in a blockquote
- Optional paragraphs with extra context
- H2 sections, each holding a list of links with short notes
- An optional section called “Optional” for pages that can be skipped when space is tight
You’ll also hear about llms-full.txt. That’s a companion file that contains the actual full text of your important pages in one place, instead of just links. It’s useful for documentation sites. For most blogs and business sites, plain llms.txt is plenty.
llms.txt vs robots.txt vs sitemap.xml
People mix these three up all the time, so here’s the quick difference.
robots.txt tells crawlers where they’re allowed to go. It’s about permission. A sitemap.xml lists every URL you want search engines to know about. It’s about completeness, and it’s meant for machines. llms.txt is a curated shortlist with explanations. It’s about meaning, and it’s meant to be readable by both machines and people.
Think of it like a restaurant. The sitemap is the full inventory of the kitchen. robots.txt is the “staff only” sign on the door. llms.txt is the printed menu with the chef’s recommendations at the top.
One more thing worth saying clearly: llms.txt does not block AI crawlers. If you want to stop a bot from reading your site, that’s still a job for robots.txt or server rules. This file is an invitation, not a fence.
The honest truth about whether it works
I’m going to be straight with you, because most articles on this topic aren’t.
llms.txt is not an official web standard. No major search engine has said that it uses the file for ranking. Google’s own people have said publicly that they don’t use it for search, and there’s no solid public proof that the big AI assistants read it by default when they answer questions. Some tools and developer workflows do use it. Coding assistants and documentation tools are the clearest example, where people feed a site’s llms.txt to a model on purpose.
So why bother? A few reasons:
- It costs almost nothing. It’s one small file.
- It forces you to decide which pages are truly your best. That exercise alone is worth it.
- If adoption grows, you’re already set up.
- It gives AI tools you point at your site a clean starting place.
Just don’t expect your traffic to jump overnight. If anyone sells you llms.txt as a ranking trick, walk away.
Do You Really Need Yoast for This?
No. Yoast added an llms.txt generator to its plugin, and it does a decent job of it. That’s why so many tutorials lean on it. But the feature is just a convenience wrapper. Under the hood, it builds a text file from your content and serves it at /llms.txt.
You can get the same result in several ways:
- Write the file by hand and upload it
- Serve it dynamically with a small code snippet
- Use another plugin that offers the feature
- Generate it with a script and keep it updated automatically
Which one is right depends on your site. A five-page business site is fine with a handwritten file. A blog with hundreds of posts that keeps growing will want something that updates itself. I’ll cover both.
Before You Start: Plan What Goes Inside
Don’t skip this part. I’ve seen people rush to upload a file with 400 links in it, and that defeats the whole purpose. The file is supposed to be a shortlist.
Pick the pages that matter
Open a blank note and write down the pages you’d send to a new customer or a new reader who asked “where should I start?” For most sites, that looks like:
- Your homepage and about page
- Your main service or product pages
- Your best cornerstone guides or articles
- Your contact page and pricing page
- Policies like shipping, returns or privacy, if people ask about them often
- Your documentation or help centre, if you have one
For a blog, I’d choose somewhere between 10 and 40 posts. Pick the ones that are accurate, complete and still true today. An outdated post from 2019 doesn’t belong in there, even if it once got a lot of traffic.
Write short, honest descriptions
Each link gets a short note after it. Write these like you’re telling a friend what the page covers. One sentence is enough.
Weak: “Our amazing guide to everything you need to know about composting.”
Better: “A beginner’s guide to starting a compost bin on a balcony, including what to add and what to avoid.”
The second one tells a reader, human or machine, exactly what they’ll find. That’s the whole job.
Know what to leave out
Leave these out of the file:
- Tag pages, category archives and author archives
- Thin pages with almost no content
- Login, cart, checkout and account pages
- Duplicate or near-duplicate pages
- Anything private, gated or paid, unless you really want it surfaced
- Old posts that are no longer correct
Remember that the file is public. Anyone can open it in a browser. Don’t list anything you wouldn’t want people to find.
Method 1: Create the File by Hand and Upload It
This is the simplest route, and it’s the one I’d suggest if your site is small or doesn’t change much.
Write the file
Open any plain text editor. Notepad on Windows, TextEdit in plain-text mode on Mac, VS Code, anything works. Don’t use Word. It adds hidden formatting that breaks the file.
Write your content using the structure I described earlier. I’ve put a full sample later in this guide that you can copy and edit.
Save it as llms.txt. Make sure the extension is really .txt and not llms.txt.txt, which happens more often than you’d think when file extensions are hidden. Save it with UTF-8 encoding so special characters, quotes and non-English letters display correctly.
Upload it through your hosting File Manager
Most hosts give you a File Manager inside their control panel (cPanel, hPanel, Plesk and so on). Here’s the general process:
- Log in to your hosting panel and open File Manager.
- Go to the folder that holds your WordPress installation. This is usually called public_html, or sometimes www or htdocs.
- You’ll know you’re in the right place when you see wp-config.php, wp-content and wp-admin sitting there.
- Click Upload and select your llms.txt file.
- Wait for it to finish.
The file must be in the root folder, right next to wp-config.php. If you drop it inside wp-content or a theme folder, it’ll show up at the wrong address and nobody will find it.
Or use FTP or SFTP
If you’re more comfortable with a tool like FileZilla, connect to your server with your FTP or SFTP details, open the root folder and drag the file across. It’s the same idea, just a different door.
Check that it works
Open a new browser tab and go to yoursite.com/llms.txt. You should see your text displayed as plain text. If you see a 404 error, the file is in the wrong folder or the name is off. If you see a download prompt instead of text, your server is sending the wrong content type, and I’ll show you how to fix that in the troubleshooting part.
The downside of this method is obvious. You have to edit the file by hand every time you publish something important. For some sites that’s perfectly fine. For others it becomes a chore you’ll forget in three weeks.
Method 2: Generate It Dynamically With a Small Code Snippet
If you’d rather have WordPress build the file for you from your actual content, a short snippet does the job. No plugin needed.
A word of caution before we start: never paste code straight into a live site without a backup. Use a child theme’s functions.php file, or better, a code snippets plugin, so a typo can’t take your whole site down. If you’re not comfortable with this, stick with Method 1.
The snippet
This code tells WordPress that when someone visits /llms.txt, it should answer with a text file built from your latest published content. You can edit the site name, the summary and the list of post types to suit your site.
php
<?php
// Serve a dynamic /llms.txt from WordPress
add_action( 'init', function () {
add_rewrite_rule( '^llms\.txt$', 'index.php?llms_txt=1', 'top' );
} );
add_filter( 'query_vars', function ( $vars ) {
$vars[] = 'llms_txt';
return $vars;
} );
add_action( 'template_redirect', function () {
if ( ! get_query_var( 'llms_txt' ) ) {
return;
}
header( 'Content-Type: text/plain; charset=utf-8' );
header( 'X-Robots-Tag: noindex' );
$site_name = get_bloginfo( 'name' );
$summary = 'Short, plain-language description of what this site is about.';
echo "# {$site_name}\n\n";
echo "> {$summary}\n\n";
// Key pages
echo "## Key pages\n\n";
$pages = get_pages( array(
'sort_column' => 'menu_order',
'number' => 15,
) );
foreach ( $pages as $page ) {
$excerpt = wp_strip_all_tags( get_the_excerpt( $page ) );
$excerpt = wp_trim_words( $excerpt, 20, '' );
echo '- [' . $page->post_title . '](' . get_permalink( $page ) . ')';
if ( $excerpt ) {
echo ': ' . $excerpt;
}
echo "\n";
}
// Latest posts
echo "\n## Recent articles\n\n";
$posts = get_posts( array(
'numberposts' => 25,
'post_status' => 'publish',
) );
foreach ( $posts as $post ) {
$excerpt = wp_strip_all_tags( get_the_excerpt( $post ) );
$excerpt = wp_trim_words( $excerpt, 20, '' );
echo '- [' . $post->post_title . '](' . get_permalink( $post ) . ')';
if ( $excerpt ) {
echo ': ' . $excerpt;
}
echo "\n";
}
exit;
} );
Flush the permalinks
After you add the code, WordPress needs to learn about the new address. Go to Settings, then Permalinks, and just click Save Changes without changing anything. That refreshes the rewrite rules. Now visit yoursite.com/llms.txt and you should see your file.
If it still shows a 404, try saving permalinks one more time, and clear any caching plugin or server cache.
Things to watch out for
Don’t let a physical file and the dynamic version fight each other. If you’ve already uploaded a real llms.txt to the root, the server will usually serve that file first and your code will never run. Delete one or the other.
Also think about caching. Building the file on every single visit is wasteful on a busy site. A caching plugin or your host’s page cache will usually handle this on its own, but you can also store the output in a transient for a few hours if you want to be thorough.
Finally, the automatic version lists whatever is newest, not whatever is best. That’s a real limit. If you care about quality over freshness, a hybrid works well: hand-pick your key pages in the code and let only the “recent articles” section update itself.
Method 3: Use a Different Plugin
Yoast isn’t the only plugin that has noticed people are asking about this. Several SEO and utility plugins have added llms.txt features over the past year, and there are small standalone plugins built just for this one job. Rank Math and All in One SEO are examples of the bigger SEO suites that have added some form of support, though features change between versions, so check the current settings in your own dashboard rather than trusting any tutorial, including this one.
When you’re choosing, here’s what I’d look for:
- It lets you pick which pages and post types get included
- It lets you edit the descriptions by hand
- It outputs a real text file with the right content type
- It’s updated regularly and has recent reviews
- It doesn’t force you to load a huge plugin you don’t otherwise need
A plugin makes sense when you don’t want to touch code and you want a settings screen. The trade-off is that you’re trusting someone else’s idea of what a good llms.txt looks like. Always open the output and read it. Auto-generated files sometimes include junk, like tag pages or draft titles, and you’ll want to catch that before the world sees it.
Method 4: Generate and Update It With a Script
This one is for people who manage a bigger site, or who like automation.
WP-CLI
If your host gives you shell access and WP-CLI, you can write a small script that pulls your chosen posts and writes the file to your root folder. Something like this, run on a schedule, can keep the file fresh:
bash
wp post list --post_type=page,post --post_status=publish \
--posts_per_page=40 --orderby=date --order=DESC \
--fields=post_title,url --format=csv
That gives you the raw material. You’d then format each row into a Markdown line and write the result to llms.txt in your root. It takes a little scripting, but once it’s done, it’s done.
Cron jobs
Pair the script with a server cron job, or with WP-Cron if that’s easier, and the file regenerates every night or every week. This is a good fit for sites with hundreds of articles that you’d never keep up by hand.
Keep a human in the loop
Whatever you automate, keep a short hand-written section at the top for your site summary and your most important pages. Machines are great at listing things. They’re not great at deciding what matters. The best setups I’ve seen mix both: a handwritten intro and a curated “start here” list, followed by an automatic section for recent content.
A Full Sample llms.txt You Can Copy
Here’s a complete example for an imaginary gardening blog. Swap in your own details.
markdown
# Green Balcony Journal
> Practical gardening advice for people with small spaces. We write about container gardening, composting, and growing food on balconies and rooftops, based on our own trial and error.
This site is written and maintained by a small team of home gardeners. Articles are updated when we learn something new. For product reviews, we only list items we have actually used.
## Start here
- [About us](https://example.com/about/): Who we are and how we test our advice.
- [Beginner's guide to balcony gardening](https://example.com/balcony-gardening-guide/): A step-by-step starting point, from choosing pots to watering.
- [Contact](https://example.com/contact/): How to reach us for questions or corrections.
## Growing guides
- [How to grow tomatoes in pots](https://example.com/tomatoes-in-pots/): Soil, pot size, feeding and common problems.
- [Herbs that survive shade](https://example.com/shade-herbs/): Which herbs cope with low light and how to care for them.
- [Watering schedule for containers](https://example.com/container-watering/): How often to water through the seasons.
## Composting
- [Starting a compost bin on a balcony](https://example.com/balcony-compost/): What to add, what to avoid and how to control smell.
- [Fixing a smelly compost](https://example.com/smelly-compost/): Quick troubleshooting for common problems.
## Policies
- [Privacy policy](https://example.com/privacy/): How we handle reader data.
- [Affiliate disclosure](https://example.com/affiliate-disclosure/): How we earn money from recommendations.
## Optional
- [Archive of older posts](https://example.com/archive/): Older articles that may be less up to date.
Look at what that does well. It starts with a plain summary. It groups links by topic. Every description says something specific. The “Optional” section at the bottom tells a model that those links can be dropped if it’s short on space.
How to Test That Everything Works
Don’t just assume the file is fine. Take five minutes and check these things.
Open it in a browser
Visit yoursite.com/llms.txt. You should see clean plain text. Every link should be a full URL starting with https.
Check it with curl
If you’re comfortable with the command line, run:
bash
curl -I https://yoursite.com/llms.txt
Look for a 200 status and a content-type of text/plain. Text/markdown also works fine. If you see text/html, your server or a plugin is wrapping the file in something it shouldn’t.
Click every link
Go through each URL. A broken link or a redirect chain defeats the purpose. If a link redirects, replace it with the final address.
Check the character encoding
If your site covers topics in another language, or uses curly quotes and dashes, make sure they show up properly. Garbled characters usually mean the file wasn’t saved as UTF-8.
Look at it on mobile
It’s plain text, so it should be fine, but long lines can wrap awkwardly. It’s a quick check and sometimes catches problems.
Common Mistakes to Avoid
I’ve seen all of these, some of them on my own sites.
Listing everything. The file isn’t a sitemap. If you dump 500 URLs into it, you’ve made a worse sitemap and lost the point.
Vague descriptions. “Great article about SEO” tells nobody anything. Say what’s in it.
Wrong location. It has to live at the root, so that yoursite.com/llms.txt works. Not in a subfolder, not in the uploads directory.
Using a Word document. Hidden formatting and smart quotes will break the Markdown. Always use a plain text editor.
Forgetting to update it. If you delete a page or change a URL, the file should change too. A llms.txt full of dead links makes your site look careless.
Including private or sensitive pages. The file is public. Treat it that way.
Expecting instant results. Nothing about this file guarantees AI tools will mention you. Treat it as housekeeping, not a growth hack.
Blocking the file by accident. Some security plugins and firewall rules block unfamiliar text files. If your file loads for you but not for others, check those settings. Also make sure robots.txt isn’t disallowing it.
Fixing Problems That Come Up
The file shows a 404 error
If you uploaded it by hand, double-check it’s in the root folder and the name is exactly llms.txt in lowercase. If you used the snippet, save your permalinks again and clear every cache. Also confirm you didn’t leave a typo in the rewrite rule.
The browser downloads the file instead of showing it
That’s a content-type issue. On Apache, you can add this to your .htaccess file:
AddType text/plain .txt
On Nginx, make sure text files are served with a text content type in your server config. If you’re not comfortable editing server files, ask your host. They fix this kind of thing in a couple of minutes.
The file shows old content
Almost always caching. Clear your caching plugin, your host’s cache and any CDN such as Cloudflare. Then reload.
WordPress redirects it to a page or homepage
This can happen when a plugin handles unknown URLs aggressively, or when a real file isn’t found. Check your redirect plugin and make sure no rule catches .txt requests.
Special Cases: Multisite, WooCommerce and Multilingual Sites
WordPress Multisite
Each site in a network can technically have its own llms.txt, but on subdirectory networks the root file belongs to the main site. For subdomain or domain-mapped sites, each domain has its own root, so each one gets its own file. Plan for this early so you don’t overwrite one site’s file with another’s.
WooCommerce stores
For a shop, resist the urge to list every product. Instead, link your main category pages, your best sellers, your shipping and returns policy, your sizing or help pages and your contact details. A model trying to answer “does this store ship to India?” will find that far more useful than 800 product links.
Multilingual sites
If you use a translation plugin, you have a choice. You can create one llms.txt in your main language and mention the other languages in it, or you can keep a single file with sections per language. Whichever you pick, keep the links consistent and avoid listing the same page three times in different forms.
Keeping the File Fresh Over Time
A good llms.txt is a living document. Here’s a simple routine I’d suggest.
- Every month: Skim the file and check the links still work.
- After a big publish: If you wrote a new cornerstone guide, add it.
- After a redesign or URL change: Update every link immediately.
- Every quarter: Reread your summary. Does it still describe your site accurately?
If you automated the file, still open it every now and then. Automation breaks silently, and you only find out when someone tells you.
It also helps to keep a copy of the file in your notes or a version-control folder. If something goes wrong, you can restore it in a minute.
Final Thoughts
You don’t need Yoast, or any single plugin, to give your WordPress site an llms.txt file. A plain text file in your root folder does the job. If you want something that updates itself, a short snippet or a script will do it, and if you prefer a settings screen, there are other plugins that offer it.
What matters more than the method is the thinking behind the file. Choose your best pages. Describe them honestly. Keep the list short and keep it current. That habit will help your human readers just as much as any AI tool, because a clear, curated “start here” page is useful to everyone. And keep your expectations realistic. This is a small, low-cost step, not a ranking switch. Set it up once, check it now and then, and get back to the real work, which is writing content that deserves to be found.
Frequently Asked Questions
What is llms.txt in simple words?
It’s a plain text file, written in Markdown, that sits at the root of your website and gives AI tools a short, clean summary of your site along with links to your most important pages. Think of it as a friendly guide for AI instead of a technical rulebook.
Can I add llms.txt to WordPress without any plugin?
Yes. Create a text file called llms.txt, then upload it to the root folder of your site using your hosting File Manager or FTP, the same place where wp-config.php lives. You don’t need a plugin at all.
Where exactly should I put the llms.txt file?
In the root directory of your site, so it loads at yoursite.com/llms.txt. On most hosts that’s the public_html folder. If you put it in a subfolder or inside wp-content, it won’t work at the right address.
Does llms.txt help my Google rankings?
There’s no public proof that it does. Google has said it doesn’t use the file for search ranking. Treat it as a small, low-effort step that may help AI tools understand your site, not as an SEO ranking tactic.
Is llms.txt the same as robots.txt?
No. robots.txt controls which crawlers can access which parts of your site. llms.txt doesn’t block or allow anything. It just offers a curated summary and a list of recommended pages. They do different jobs, and you can use both.
How many links should I include?
Fewer than you think. For most sites, 10 to 40 well-chosen links is plenty. The point is to highlight your best content, not to list every URL. If you want a complete list, that’s what your XML sitemap is for.