You do not need a paid tool or an account to create an llms.txt. It is a plain-text file, so the fastest approach is a template plus a short script that pulls URLs from your sitemap. This guide gives you both, then shows how to check the result. If you want the background first, read the llms.txt guide.
The copy-paste template
Start here. Replace the bracketed text with your own details and delete any sections you do not need:
# Your Company Name
> One or two sentences describing what you do, who you serve,
> and why your pages are worth citing.
## Key pages
- [Homepage](https://yoursite.com/): overview of the company and what we offer.
- [Pricing](https://yoursite.com/pricing/): current plans and costs.
- [Documentation](https://yoursite.com/docs/): technical reference and guides.
- [Blog](https://yoursite.com/blog/): articles on industry topics.
## Optional
- [Full documentation](https://yoursite.com/llms-full.txt): expanded reference material.
Keep it short. A few dozen lines is plenty. List the pages you would actually want an assistant to read first, not every page on the site. Use absolute URLs so nothing has to be guessed.
Generate it from your sitemap (Node.js)
If your site has a lot of pages, typing the list is tedious. This small script reads sitemap.xml and writes a starter llms.txt. Save it as generate-llms.mjs in the folder that contains your sitemap:
import fs from 'node:fs';
const SITE = 'https://yoursite.com';
const NAME = 'Your Company Name';
const SUMMARY = 'One or two sentences describing what you do and who you serve.';
const xml = fs.readFileSync('sitemap.xml', 'utf8');
const urls = [...xml.matchAll(/<loc>(.*?)<\/loc>/g)]
.map((m) => m[1].trim())
.filter((u) => u.startsWith(SITE));
const lines = [
`# ${NAME}`,
'',
`> ${SUMMARY}`,
'',
'## Key pages',
...urls.slice(0, 20).map((u) => {
const p = u.replace(SITE, '') || '/';
return `- [${p}](${u}): add a short description here.`;
}),
'',
];
fs.writeFileSync('llms.txt', lines.join('\n'));
console.log(`Wrote llms.txt with ${Math.min(urls.length, 20)} pages`);
Run it with:
node generate-llms.mjs
Two important points:
- Edit the descriptions. The script writes placeholders on purpose. A list of links with no context is much less useful than a list that says what each page is for.
- Trim the list. Twenty pages is a starting ceiling, not a target. If your sitemap has 500 URLs, the first 20 are rarely the 20 that matter. Choose deliberately.
The script assumes a plain sitemap with <loc> tags, which covers the standard format. If your sitemap is an index of other sitemaps, point it at the child sitemap or collect the URLs another way.
Where to upload it
The file must be served from the root, at https://yoursite.com/llms.txt, and return HTTP 200 with a plain-text content type.
- Static hosts, Cloudflare Workers or Pages: put
llms.txtin your public/assets folder and deploy. - WordPress: upload via FTP or your host's file manager into the site root. Some SEO plugins now offer an llms.txt setting.
- Shopify and hosted builders: arbitrary root files may be restricted; check what your platform supports and use a route or proxy if needed.
- Generated sites: produce
llms.txtin the same build step as your sitemap so the two never drift apart.
If you use a build pipeline, generate the file automatically rather than maintaining it by hand — that is what the script above is for.
Validate the result
Before you forget about it, check:
- Open
https://yoursite.com/llms.txt— does it render as plain text? - Confirm the status is HTTP 200, not a redirect chain or a 404 page styled as text.
- Check every listed URL resolves and is not blocked by
robots.txt. - Confirm the descriptions are accurate and match the current site.
- Run the free checker at https://ai.ynnadmusic.uk, which reports whether an
llms.txtis detected.
Re-run the script whenever your important pages change, and review the descriptions rather than trusting the placeholders.
Common mistakes
- Listing everything. A 500-line dump is not a summary.
- Relative URLs. Use full
https://URLs throughout. - Contradicting robots.txt. An
llms.txtdoes not override a block. Fix access first. - Forgetting the content type. Serving the file as
text/htmlcan confuse parsers. - Treating it as a ranking factor. It is an emerging convention with no published guarantee. The higher-impact work is crawlable, answer-first content — see the AI visibility checklist.
Frequently asked questions
Do I need a paid llms.txt generator?
No. It is a text file with a simple structure. A template and a short script are enough for almost every site.
Does llms.txt guarantee AI citations?
No. There is no evidence it is a requirement or a ranking factor. It may make it easier for a model to find your key pages, but it does not force a citation.
Can I generate llms.txt from a WordPress site?
Yes. Place the file in the site root via FTP or your host's file manager, or use a plugin that supports root files. Keep the list short and regenerate when your key pages change.
What is llms-full.txt?
An optional extension containing expanded content. It is not part of the basic convention and most sites do not need it. Start with a concise llms.txt.
Where should llms.txt be hosted?
At the root of the domain: https://yoursite.com/llms.txt. A file in a subdirectory will not be found by tools expecting the root location.