Skip to main content

llms.txt Writing Guide

6.1 What Is llms.txt

llms.txt is a Markdown file placed in your website’s root directory that tells AI agents who you are, what you do, and what your core products and policies are, all in concise language. Analogy: robots.txt tells crawlers “where you can go”; llms.txt tells AI agents “who I am.” Think of it as the company brochure at the front desk — the first thing an AI agent reads when it visits your site to get the full picture. File path: https://yourdomain.com/llms.txt

6.2 Why You Need llms.txt

AI agents (ChatGPT, Claude, Gemini, and others) need to quickly understand a website’s full profile when recommending products or answering user questions. Unlike humans who can browse multiple pages and piece together information, AI agents prefer to find all key information in one place. llms.txt is that one place. It solves:
  1. AI hallucination: AI agents may fabricate information about you based on outdated training data. llms.txt provides a real-time, accurate self-description
  2. Information fragmentation: Your company information may be scattered across “About Us,” “Contact,” “Privacy Policy,” and other pages
  3. AI discoverability: Websites with llms.txt are significantly more efficient for AI agent information retrieval than those without

6.3 llms.txt Specification Format

Per the llmstxt.org specification, llms.txt uses Markdown format:

6.4 E-Commerce llms.txt Template

6.5 SaaS / Service Website llms.txt Template

Non-e-commerce websites also benefit from llms.txt:

6.6 Writing Principles

  1. Accuracy first: Do not exaggerate. AI agents may relay your description directly to users
  2. Concise and clear: Keep total length between 500 and 1,500 words. Too short means insufficient information; too long risks truncation by AI agents
  3. Structured: Use Markdown headings and lists; avoid long paragraphs
  4. Include links: Enable AI agents to navigate to detailed pages
  5. Keep it updated: When product lines change or policies are revised, update llms.txt accordingly
  6. Avoid keyword stuffing: AI agents differ from traditional search engines; keyword stuffing does not improve results and actually reduces credibility

6.7 llms-full.txt (Extended Version)

Some AI agents also look for llms-full.txt, an expanded version of llms.txt that can include additional information:
  • Complete FAQ sections
  • Detailed product specifications
  • API documentation summaries (if applicable)
  • Detailed company history
File path: https://yourdomain.com/llms-full.txt

6.8 Deployment by Platform

6.9 Verification

After deployment, verify:
  1. Visit https://yourdomain.com/llms.txt and confirm it loads correctly
  2. Confirm the Content-Type header is text/plain or text/markdown
  3. Confirm the Markdown formatting renders properly
  4. Confirm robots.txt is not blocking /llms.txt

Next chapter: agent.json Service Declaration — Telling AI agents what interaction capabilities your site supports