Prompt to generate an llms.txt file for a migrated site
This prompt asks an AI assistant to write an llms.txt file from your real pages: a short description, then links grouped by topic with a one-line summary each. It uses only text that exists on your site. llms.txt is a community proposal, and Google says AI features need no special files.
Last reviewed
Key facts
- llms.txt is a proposal for a markdown file that gives language models a curated overview of a site.
- The llmstxt.org page presents it as a proposal and does not say that any search engine has adopted it.
- Google says there are no additional requirements to appear in AI Overviews or AI Mode.
- Test status: run on a real export. The generated file linked 5 pages and every link returned 200.
The prompt
Paste this into Claude Code, Cursor, Gemini CLI or another AI coding assistant with your project folder open, and replace everything in square brackets first. See how to run it in each tool.
You are writing /llms.txt for my site. The built pages are in [BUILD_FOLDER] and the live domain is [DOMAIN].
FORMAT
1. A level-1 heading with the site name.
2. A blockquote with a one or two sentence description of what the site is and who it serves.
3. A short paragraph with anything a reader needs to know to use the links, such as what the product is and what it costs.
4. Sections with level-2 headings. Each section is a list of links in the form: - [Page title](absolute URL): one sentence on what the page answers.
RULES
- Use only pages that exist and return 200. Use absolute https URLs on [DOMAIN].
- Take descriptions from the page's own text. Do not add claims, prices, statistics or customer names that are not on the page.
- Group pages by what a reader wants to do, for example: Learn, Compare, Set up, Pricing, Contact.
- Keep the file under about 100 lines. Link to the most useful pages, not all of them.
- Put an optional "Optional" section at the end for secondary pages.
OUTPUT
- llms.txt
- LLMS_REPORT.md listing every page you left out and why.How to run it
- Build the site first, so the assistant reads the real pages and can check their URLs.
- Send the prompt with the build folder and domain filled in.
- Read each description in the output against the page it describes and fix any that claim more than the page does.
- Save the file at the site root so it answers at /llms.txt, and add the same URLs to your sitemap.
A small example of the format
This skeleton shows the shape the prompt asks for. The names and addresses are placeholders.
# Example Studio
> Example Studio designs and builds websites for small businesses.
Prices and delivery times are on the pricing page.
## Learn
- [How we work](https://example.com/process): the four steps from brief to launch.
## Pricing
- [Pricing](https://example.com/pricing): the plans and what each one includes.
## Optional
- [Contact](https://example.com/contact): how to reach the team.Verify the result
Check that the file is served and that every link in it works. A link that returns an error makes the file worse than no file.
curl -sI https://example.com/llms.txt | grep -iE "^(HTTP|content-type)"
grep -oE "https://[^) ]+" llms.txt | sort -u | while read -r u; do
echo "$(curl -s -o /dev/null -w "%{http_code}" "$u") $u"
done- The file answers 200 as plain text at /llms.txt.
- Every link returns 200 and sits on your own domain.
- Each description matches its page and adds no claim the page does not make.
What can go wrong
- Treating llms.txt as a ranking factor. Google says AI features need no special files, and the proposal does not claim search engines adopted it.
- The assistant fills descriptions with marketing language. The prompt limits it to text from each page.
- A stale file that links to removed pages. Regenerate it after each site change.
Frequently asked questions
Do I need llms.txt to appear in AI answers?
No. Google says there are no additional requirements to appear in AI Overviews or AI Mode. The file is a low-cost extra for assistants and tools that choose to read it.
What does llms.txt contain?
A markdown overview with a title, a short description and links to the pages that matter, each with a sentence about it.
Is there a tool that builds it?
The Website MD File Generator creates an AI-ready markdown file, and the Markdown Converter turns pages into markdown.
Should every page be in the file?
No. Link the pages a reader is most likely to need, and keep the file short.
Official documentation
Free tools for this job
- Website MD File GeneratorConvert any webpage into a clean Markdown file optimized for AI ingestion.
- Markdown ConverterConvert files, pasted text, webpage content, Notion, and Google Docs into Markdown.
- AI FAQ GeneratorGenerate structured FAQ sections from a topic or URL for your website.
- XML Sitemap GeneratorGenerate a standards-compliant XML sitemap from your URL list in one click.
Start with the files
Prompts work best on a WebExport download of your site. Paste your public URL into the export form and get a ZIP. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.