In short
After the header, an llms.txt file contains ## sections that list the site's reference pages, each with a short note. It is not a second sitemap: it is a selection of ten to a few dozen pages that answer the questions most often asked about your business. Once this check is done, the file is served at https://example.com/llms.txt as UTF-8 text, and every link points to a public, canonical page returning 200. The format remains experimental.
Why it matters
The llmstxt.org proposal describes the link sections as follows: sections delimited by H2 headings, containing lists of [name](url) links, optionally followed by : and a note. It expects agents to scan the file, pick the links relevant to the question at hand, then follow them. The file must remain short enough to fit in a model's context; the detail sits behind the links.
That is the difference from a sitemap, which the proposal points out: a sitemap lists every indexable page, which exceeds the useful size for a model and mixes the essential with the incidental. An llms.txt that copies the sitemap loses its only value, the selection. Conversely, a list without notes forces the agent to guess the content of each page from its title.
A section named Optional conventionally groups secondary links, which the agent can skip when it is short of space.
What it improves
- Guidance for agents that read the file They go straight to the pricing, shipping or contact page instead of browsing the navigation.
- Accuracy By pointing to the authoritative pages, you reduce the risk of an agent relying on a secondary or old page.
- Internal audit The selection forces you to identify the reference pages, which also helps internal linking.
- Citations and ranking No demonstrated effect. No practice guarantees a citation or a recommendation.
How to check
First check the file's HTTP response:
curl -s -o /dev/null -w "%{http_code} %{content_type}\n" https://example.com/llms.txt
Compliant result: 200 text/plain; charset=utf-8 (or text/markdown; charset=utf-8). text/html indicates that the site returns an HTML page instead of the file.
Then check every link: final HTTP code and no redirect.
curl -s https://example.com/llms.txt \
| grep -o -E '\]\(https?://[^)]+\)' | sed -E 's/^\]\(//; s/\)$//' \
| while read -r url; do
printf "%s %s\n" "$(curl -s -o /dev/null -w '%{http_code}' "$url")" "$url"
done | sort
Every line should start with 200. A 301 or 302 indicates a link to replace with its destination; a 404 or 410, a link to remove.
Finally, check the structure: a single #, ## sections, no empty ## section, a note after every important link. Count the links with curl -s https://example.com/llms.txt | grep -c '^- \['.
How to implement
Before you start
Choose the pages using these criteria, in order:
- It answers a frequent question about your business (what you sell, how much, where, how to contact you, on what terms).
- It is authoritative: it is the official page, not a blog post that talks about it.
- It is public, canonical, indexable and returns
200. - It is stable: its URL will not change next quarter.
| Type of site | Suggested sections | Indicative volume |
|---|---|---|
| Tradesperson, local brochure site | Services, Area and contact, Practical information | 8 to 15 links |
| Online shop | Catalog (categories, not product pages), Ordering, Shipping and returns, Guides | 15 to 40 links |
| SaaS | Product, Pricing, Documentation, Security and compliance, Company | 20 to 50 links |
These volumes are rules of thumb from practice, not a limit set by the proposal. Documentation, products and official resources are covered in list official documentation, products, services and resources (opens in a new tab).
Write the notes as one sentence that says what the page contains, not what it promises: “delivery times and rates by country”, not “discover our exceptional offers”.
Full example for Thé des Lisières, a fictional online shop:
# Thé des Lisières
> Online shop for loose-leaf teas from small plantations, sold by weight. Delivery to France, Belgium, Germany, Austria and Switzerland.
Prices in euros including VAT. The general terms and conditions of sale prevail in case of doubt.
## Catalog
- [Green teas](https://example.com/thes/verts/): origins, weights and prices of green teas
- [Black teas](https://example.com/thes/noirs/): plain and flavored black teas
- [Gift sets](https://example.com/coffrets/): discovery sets and gifts
## Ordering
- [Shipping](https://example.com/livraison/): delivery times, carriers and rates by country
- [Returns and refunds](https://example.com/retours/): conditions and withdrawal period
- [General terms and conditions of sale](https://example.com/cgv/): contractual text currently in force
## Guides
- [Brewing loose-leaf tea](https://example.com/guides/preparer-the/): temperatures and steeping times by tea family
- [Storing tea](https://example.com/guides/conserver-the/): shelf life and containers
## Contact
- [Contact us](https://example.com/contact/): form, phone number and customer service hours
## Optional
- [Our story](https://example.com/a-propos/): how the company started and how the plantations are chosen
- [Blog](https://example.com/blog/): news and this season's harvests
The links are absolute, as in all the proposal's examples; see use absolute URLs (opens in a new tab). If the site publishes Markdown versions of its pages, the proposal recommends linking to those versions rather than the HTML pages: see evaluate Markdown versions (opens in a new tab).
Good to know: include only public pages. A customer-only page, a staging environment or an internal document has no place in a file anyone can read. See exclude confidential data (opens in a new tab).
Apache
Versions Apache 2.4.
Place llms.txt in the web root, next to robots.txt (/var/www/example/public/llms.txt), saved as UTF-8. Apache serves it as text/plain; add the character set in the .htaccess or the virtual host:
<Files "llms.txt">
AddCharset UTF-8 .txt
</Files>
A .htaccess file takes effect immediately. In the virtual host: sudo apachectl configtest && sudo systemctl reload apache2. CMS rewrite rules (WordPress, PrestaShop, Drupal) do not apply to a file that physically exists.
Nginx
Versions Nginx 1.24 and later.
Place the file in the root set by root, then add to the server block:
location = /llms.txt {
charset utf-8;
try_files $uri =404;
}
text/plain is among the types to which charset applies by default. try_files $uri =404 prevents a general rule from passing the request to the application when the file is missing. Reload: sudo nginx -t && sudo systemctl reload nginx.
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026.
Nothing to configure to publish: Cloudflare passes the file through from the origin and, by default, does not cache .txt files other than robots.txt. If a rule caches the whole site, purge the file after each change in Caching > Configuration, Custom Purge. Also check in AI Crawl Control that the crawlers you are targeting are not blocked.
Shared hosting
Upload llms.txt by FTP or through the hosting provider's file manager (cPanel, Plesk) to the site's root folder, often public_html/ or httpdocs/. Save it as UTF-8 without line-ending conversion. If the host uses Apache, add the AddCharset block from the Apache section to the .htaccess file.
WordPress
Versions WordPress 6.6 and later; Yoast SEO, Rank Math and AIOSEO in their November 2026 versions.
With a plugin
- Yoast SEO:
Yoast SEO > Settings > Site features,AI toolssection,LLMS.txt. Turn it on, thenCustomize llms.txt fileandManual page selectionto choose the pages yourself. Yoast states that the feature is not available on multisite. - Rank Math: enable the
LLMS Txtmodule inRank Math SEO > Dashboard, thenRank Math SEO > General Settings > Edit llms.txt. Choose the post types and taxonomies, set the limit (100 by default) and add your reference links inAdditional Content.noindexcontent is excluded. - AIOSEO: the generator is configured from the plugin's dashboard (post types, taxonomies, number of links per type). The free version generates
llms.txt.
An automatic selection of the “100 latest posts” is not a selection: lower the limit and favor reference pages. Review the file produced.
Without a plugin
Upload llms.txt to the site root, at the same level as wp-config.php. WordPress rules (Apache and Nginx alike) serve an existing file without going through PHP. Turn off generation in SEO plugins to avoid two competing sources.
Shopify
Versions Shopify admin, all plans, November 2026.
Shopify does not let you place a file at the root of the store. Two options:
- An app: Yoast SEO for Shopify offers
llms.txtgeneration, with manual page selection. - A file and a redirect: upload
llms.txtinContent > Filesand copy its URL. ThenContent > Menus,View URL Redirects,Create URL redirect: from/llms.txtto the full URL of the file. Shopify only accepts a redirect from an address that returns a 404 error, which is the case as long as no app serves that path.
The second option serves the file from another domain after a redirect; how agents handle this case is not documented. Every time you change the file, its URL changes: update the redirect.
Wix
Versions Wix dashboard, paid plans with a custom domain, November 2026.
Wix generates and maintains the file for sites published with a custom domain and indexing turned on. To adjust the list: SEO & GEO, Tools and settings, Go to llms.txt, More Actions > Edit file. A manual edit stops automatic updates.
Laravel
Versions Laravel 12 and 13.
Generate the file from a view, so that the URLs follow your routes. In routes/web.php:
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Route;
Route::get('/llms.txt', fn (): Response => response()
->view('llmsTxt', status: 200, headers: ['Content-Type' => 'text/plain; charset=UTF-8']))
->name('llmsTxt');
Then resources/views/llmsTxt.blade.php:
# Planifia
> Online software for scheduling technical field work for maintenance SMEs.
## Product
- [Features]({!! route('features') !!}): scheduling, work orders and mobile app
- [Pricing]({!! route('pricing') !!}): monthly and annual plans, prices excluding tax
## Company
- [Contact]({!! route('contact') !!}): sales form and support
{!! !!} prevents Blade from turning & or ' into HTML entities, which are unreadable in a text file. Adapt the route names to your own. With php artisan route:cache, rebuild the cache after deployment.
Next.js
Versions Next.js 15 and 16 (App Router).
For a fixed file, place llms.txt in public/: it is served at /llms.txt. To generate it from your data, create app/llms.txt/route.ts:
const siteUrl = 'https://example.com';
const sections = [
{
title: 'Product',
links: [
{ name: 'Features', path: '/fonctionnalites', note: 'scheduling, work orders and mobile app' },
{ name: 'Pricing', path: '/tarifs', note: 'monthly and annual plans, prices excluding tax' },
],
},
];
export async function GET() {
const body = [
'# Planifia',
'',
'> Online software for scheduling technical field work for maintenance SMEs.',
'',
...sections.flatMap((section) => [
`## ${section.title}`,
'',
...section.links.map((link) => `- [${link.name}](${new URL(link.path, siteUrl)}): ${link.note}`),
'',
]),
].join('\n');
return new Response(body, {
headers: { 'Content-Type': 'text/plain; charset=utf-8' },
});
}
Do not keep both public/llms.txt and this route: only one mechanism should serve that path. Check after deployment with the curl command from the “How to check” section.
Common mistakes
- Copying the sitemap: hundreds of links with no hierarchy, the opposite of a selection.
- Links without notes or promotional notes: the agent does not know what it will find behind them.
- Linking product pages one by one on a large catalog: link the categories and the terms pages.
- Linking redirected or non-canonical URLs: each hop adds a request and blurs the reference page. See fix links to redirects or non-canonical URLs (opens in a new tab).
- File served as
text/htmlby a CMS that returns its home page. - Two active generators (SEO plugin and static file): you no longer know which one is served.
- An
## Optionalsection filled with essentials: by convention, that is what an agent can skip.
Frequently asked questions
How many links should an llms.txt file contain?
The llms.txt proposal sets no number; it only asks that the file stay short enough to fit in a model's context. In practice, ten to fifteen links are enough for a brochure site, fifteen to forty for a shop and a few dozen for a SaaS. Beyond that, create files per subdirectory, such as /docs/llms.txt, rather than an endless list.
Should every product page be listed in llms.txt?
No. An llms.txt file is a selection, not a catalog. For a shop, list the categories, the terms pages (shipping, returns, warranties) and a few reference guides. Product pages remain reachable through the sitemap and navigation. Listing thousands of products would push the file past its useful size and require an update every time stock changes.
What is the Optional section of llms.txt for?
The Optional section of llms.txt conventionally groups the secondary links an agent can skip when it needs to save space in its context. Since version 2 of the proposal, it no longer has any mechanical meaning for tools, but the convention remains useful. Put the company history, the blog or the archives there, never the pricing or the terms of sale.
Where should the llms.txt file go on the server?
Place the llms.txt file at the root of the site, so that it responds at https://example.com/llms.txt, at the same level as robots.txt. The proposal also allows a file in a subdirectory, such as /docs/llms.txt, which then covers the pages under that path. Serve it as plain text encoded in UTF-8 and check that it responds with a 200 code.
Resources
- llmstxt.org: the llms.txt proposalllmstxt.org
- Yoast: enable llms.txt, Rank Math: llms.txt and AIOSEO: llms.txtyoast.com
- Shopify Help: URL redirectshelp.shopify.com
- Wix Help: understanding your site's llms.txt filesupport.wix.com
- Cloudflare: default cache behaviordevelopers.cloudflare.com
- Next.js: Route Handlers and Nginx: charset directivenextjs.org
Updated on
Topic checklist (PDF)