How to Create an llms.txt File: Step-by-Step Guide with Examples
GEO How-To GuidesWhat Is llms.txt and Why Does It Matter?
If you have been following the evolution of AI-powered search, you have probably noticed that large language models (LLMs) like ChatGPT, Claude, Perplexity, and Gemini are increasingly crawling the web to source answers. But unlike traditional search engines that rely on sitemaps and robots.txt, these AI systems need a different kind of guidance. That is where llms.txt comes in.
The llms.txt file is a proposed standard — a plain-text file placed at the root of your website — that tells AI crawlers what your site is about, what content is most important, and how to interpret your pages. Think of it as a README for AI systems. While robots.txt tells crawlers what NOT to do, llms.txt tells them what they SHOULD pay attention to.
Why does this matter? Because AI search engines are becoming a primary discovery channel. If an LLM cannot understand your site quickly and accurately, your content will not appear in AI-generated answers. An llms.txt file dramatically improves your chances of being cited, referenced, and recommended by AI assistants.
The llms.txt File Format Specification
The llms.txt format is intentionally simple. It is a Markdown-like plain text file with a clear structure:
Line 1: A top-level heading with your site or project name (using # syntax). Following lines: A brief description of what your site does. Then organized sections with links to your most important pages using standard Markdown link syntax. Optional sections can include details about your API, documentation, blog, or product pages.
The key principle is brevity and clarity. LLMs have context windows, so your llms.txt should be concise — ideally under 2,000 words — while covering everything an AI needs to understand and accurately represent your site.
Step-by-Step Creation Process
Step 1: Identify your core pages. List the 10-20 most important pages on your site. These are typically your homepage, key product pages, about page, pricing page, and top-performing blog posts. Prioritize pages that best represent what your business does.
Step 2: Write a concise site description. In 2-3 sentences, describe what your website or product does. Be specific — avoid marketing fluff. AI systems value factual, clear descriptions over promotional language.
Step 3: Organize content into sections. Group your links logically. Common sections include: About, Products/Services, Documentation, Blog/Resources, and Contact. Each section should have a brief one-line description.
Step 4: Format using the llms.txt specification. Use Markdown heading syntax for sections, and standard Markdown links for pages. Keep descriptions factual and concise.
Step 5: Save as llms.txt and deploy to your site root. The file should be accessible at yourdomain.com/llms.txt — just like robots.txt lives at yourdomain.com/robots.txt.
Example 1: SaaS Product
For a SaaS product like a project management tool, your llms.txt might start with: # TaskFlow - Project Management Software. Then a description: TaskFlow is a project management platform for remote teams, offering kanban boards, time tracking, and sprint planning. Founded in 2021, serving 50,000+ teams. Then sections for Features (linking to kanban, time-tracking, sprint-planning pages), Pricing (linking to your pricing page), Documentation (linking to API docs and getting-started guides), and Blog (linking to your top educational posts).
Example 2: Blog or Content Site
For a blog, focus on your most authoritative content. Start with your site name and description, then organize by topic categories. Link to your 5-10 best posts per category. Include an About section that establishes author credentials and expertise — this helps AI systems assess content authority.
Example 3: E-Commerce Store
For e-commerce, your llms.txt should highlight product categories rather than individual products (unless you have hero products). Include sections for: Product Categories (with links to main category pages), Shipping and Returns policies, About the Brand, and Customer Reviews or Testimonials pages. AI assistants frequently answer shopping-related queries, so making your store understandable is critical.
Example 4: Documentation Site
Technical documentation sites benefit enormously from llms.txt. Structure it with: an overview of what the software does, links to Getting Started guides, API Reference sections, Tutorial pages, and Changelog. Developers increasingly ask AI assistants for code examples and implementation guidance — your docs need to be discoverable.
Where to Host and How to Test
Host your llms.txt at the root of your domain: https://yourdomain.com/llms.txt. For most web hosts, simply upload the file to your public root directory. For static site generators like Next.js or Nuxt, place it in the public/ folder. For WordPress, you can either upload it via FTP or use a plugin.
To test that your file is accessible, simply visit the URL in your browser. You should see the raw text content. Then verify the formatting is correct and all links resolve properly.
For a comprehensive check, use the GEOScore AI Crawler Checker to verify that AI crawlers can detect and properly read your llms.txt file. This tool checks not only the presence of llms.txt but also whether its format follows best practices and whether AI crawlers are actually accessing it.
Final Tips
Keep your llms.txt updated whenever you add major new pages or products. Review it quarterly at minimum. Avoid stuffing it with every page on your site — focus on quality over quantity. And remember: llms.txt is just one piece of the GEO (Generative Engine Optimization) puzzle. Combine it with structured data, strong entity signals, and citation-ready content for maximum AI search visibility.