Blog · November 28, 2026
how to write an llms.txt file
```json
{
"title": "How to Write an llms.txt File: Complete Guide for AI Search Visibility",
"meta_description": "Learn how to create an llms.txt file to help AI search engines understand and cite your website. Step-by-step guide with examples and best practices.",
"body": "# How to Write an llms.txt File: Complete Guide for AI Search Visibility\n\nAn llms.txt file is a simple text document placed at your website's root (yourdomain.com/llms.txt) that tells AI engines like ChatGPT, Perplexity, and Claude what your site is about and which pages matter most. The file uses markdown formatting to provide a structured summary, key URLs, and context that helps language models accurately cite and represent your business when answering user queries.\n\n## What exactly is an llms.txt file and why does it matter?\n\nThe llms.txt standard emerged in late 2024 as a parallel to robots.txt, but instead of controlling crawler access, it guides how AI models understand your content. Think of it as a cover letter for AI engines.\n\nWhen an AI engine evaluates your website, it processes massive amounts of text. An llms.txt file cuts through the noise by:\n\n- Declaring your site's primary purpose in clear language\n- Highlighting your most authoritative pages\n- Providing structured context that improves citation accuracy\n- Helping models distinguish between marketing fluff and substantive content\n\nFor small businesses, this matters because AI search is fundamentally different from traditional SEO. Google rewards backlinks and technical optimization; AI engines reward clarity, structure, and relevance to specific queries. A well-crafted llms.txt file directly influences whether ChatGPT recommends your plumbing service or your competitor's when someone asks \"best emergency plumber near Austin.\"\n\n## What should you include in an llms.txt file?\n\nThe format is intentionally flexible, but effective llms.txt files share common elements:\n\n### Site summary section\n\nStart with a concise description (2-4 sentences) of what your business does. Avoid marketing language. Be specific:\n\nWeak: \"We're a leading provider of innovative solutions...\"\n\nStrong: \"Martinez Accounting provides tax preparation, bookkeeping, and QuickBooks setup for small businesses and freelancers in Denver. We specialize in construction contractors and creative professionals.\"\n\n### Primary URLs\n\nList 5-10 of your most important pages with brief descriptions. Use this format:\n\n```\n# Key Resources\n\n- /services/tax-preparation: Tax filing for individuals and S-corps, including quarterly estimates\n- /pricing: Flat-rate pricing for bookkeeping and tax services\n- /quickbooks-setup: QuickBooks Online implementation and training\n```\n\nAI models use these URLs as entry points when they determine you're relevant to a query. The descriptions help them understand what they'll find before crawling.\n\n### Specializations and differentiators\n\nInclude a brief section on what makes you different. This is especially important for local businesses and specialized service providers:\n\n```\n# Our Focus\n\nWe work exclusively with businesses under $2M revenue. Our pricing is transparent with no surprise fees. We respond to client questions within 4 business hours during tax season.\n```\n\nThis level of specificity helps AI engines match you to nuanced queries like \"accountant for small construction business\" rather than generic searches.\n\n## How do you structure the actual file format?\n\nThe llms.txt specification uses markdown, which makes it both human-readable and machine-parseable. Here's a complete working example:\n\n```markdown\n# Martinez Accounting Services\n\nTax preparation, bookkeeping, and financial consulting for small businesses in Denver. We specialize in construction contractors and creative professionals earning $50K-$2M annually.\n\n## Services\n\n- /services/tax-prep: Individual and business tax preparation (Form 1040, 1120-S, 1065)\n- /services/bookkeeping: Monthly bookkeeping with QuickBooks Online\n- /services/consulting: Financial planning and cash flow analysis\n- /pricing: Flat-rate service pricing (updated January 2025)\n\n## About\n\nFounded 2018. CPA-owned. Serving 200+ small business clients.\nSpecialties: construction accounting (job costing, progress billing), creative industry finances (project-based income, irregular cash flow).\n\n## Contact\n\nPhone: (303) 555-0147\nEmail: [email protected]\nOffice: 1234 Larimer St, Denver CO 80202\nSchedule: /book-consultation\n```\n\nKey formatting rules:\n\n- Use `#` for main heading (business name)\n- Use `##` for section headings\n- Use `-` for bulleted lists\n- Keep line lengths reasonable (under 100 characters)\n- Use absolute paths (/services/tax-prep) or full URLs\n- Update the file when you add major services or change focus\n\n## What mistakes should you avoid?\n\nAfter analyzing hundreds of llms.txt files, several patterns consistently hurt AI visibility:\n\n### Mistake 1: Marketing speak instead of plain language\n\nAI models are trained to identify and deprioritize promotional language. \"Leveraging synergistic solutions\" tells them nothing. \"Installing commercial HVAC systems in office buildings\" tells them exactly when to cite you.\n\n### Mistake 2: Listing every page on your site\n\nMore is not better. If you list 50 URLs, the AI model has to decide which matters. If you list your 7 most important pages with clear descriptions, you've made that decision for them. Focus on pages that answer common customer questions.\n\n### Mistake 3: Neglecting to update it\n\nYour llms.txt file should change when your business changes. Launched a new service line? Add it. Stopped offering residential work? Remove those URLs. AI engines cache this information, and outdated llms.txt files lead to irrelevant citations.\n\n### Mistake 4: Duplicate content from your homepage\n\nDon't copy-paste your hero section. The llms.txt file should provide structured data about your site, not reproduce existing content. Think of it as metadata, not marketing copy.\n\n## How do you know if your llms.txt file is working?\n\nMeasuring AI visibility is harder than tracking Google rankings, but there are signals:\n\n- Direct testing: Ask ChatGPT, Perplexity, and Claude queries your customers would ask. Do they cite you? Do they cite competitors?\n- Referral traffic: Check analytics for traffic from chatgpt.com, perplexity.ai, and other AI platforms\n- Citation monitoring: Search for your business name in AI engines weekly and track whether you're mentioned\n\nFor small businesses without technical resources, this manual process is time-consuming. Tools like botsrankme (an MCP server that monitors AI citations and optimizes your llms.txt file) automate this tracking and provide specific recommendations when your visibility drops.\n\nThe bigger challenge is that AI search is still evolving. What works today might need adjustment in six months as these platforms refine how they evaluate sources.\n\n## Should every business create an llms.txt file?\n\nNot necessarily. The llms.txt file matters most if:\n\n- You serve local markets where AI engines recommend specific providers\n- You offer specialized services that people research conversationally (\"best way to winterize a pool in Arizona\")\n- You publish educational content that answers specific questions\n- You compete in crowded categories where differentiation matters\n\nIf you're a large brand that already dominates search, AI engines will cite you regardless. If you sell exclusively through established marketplaces (Amazon, Etsy), direct AI visibility matters less.\n\nBut for the typical small business—the local contractor, the specialized consultant, the service provider competing against 20 similar businesses—an llms.txt file is a low-effort way to influence how AI engines understand and represent you.\n\n## How does llms.txt compare to other AI optimization techniques?\n\nThe llms.txt file is one piece of a broader AI visibility strategy:\n\nllms.txt vs. structured data (schema markup): Schema helps traditional search engines categorize you. llms.txt helps AI engines understand what you do in natural language. Use both.\n\nllms.txt vs. content optimization: Great content gets you cited; llms.txt ensures you're cited accurately and for the right queries. The file doesn't replace content—it guides models to your best content.\n\nllms.txt vs. robots.txt: Robots.txt controls crawler access. llms.txt provides context. They serve completely different functions.\n\nThink of your AI visibility stack as:\n\n1. Quality content that answers real questions\n2. Clear site structure and navigation\n3. llms.txt file that maps your site for AI engines\n4. Ongoing monitoring of how you're actually cited\n\n## What's the future of llms.txt?\n\nThe standard is still evolving. Expect these developments:\n\n- Verification mechanisms: Ways to prove your llms.txt file is authoritative and hasn't been compromised\n- Expanded metadata: Fields for business hours, service areas, pricing transparency\n- Integration with other standards: Connections between llms.txt, schema.org, and other structured data formats\n\nThe businesses that benefit most will be those who adopt early and iterate as the standard matures. AI search rewards clarity and structure—exactly what llms.txt provides.\n\n---\n\n## Frequently Asked Questions\n\nQ: Where exactly do I put the llms.txt file on my website?\n\nA: Place it at the root of your domain: https://yourdomain.com/llms.txt (not in a subdirectory). Upload it via FTP, your hosting control panel, or your CMS. It should be a plain text file, not a Word doc or PDF. Test that it's accessible by visiting the URL in a browser.\n\nQ: How long should an llms.txt file be?\n\nA: Aim for 300-800 words total. Long enough to provide meaningful context, short enough that AI models actually process it. The file should take 2-3 minutes to read. If you're writing more than 1000 words, you're probably including too much detail.\n\nQ: Can an llms.txt file hurt my SEO or traditional search rankings?\n\nA: No. It's a separate text file that Google and other traditional search engines ignore. It doesn't affect your robots.txt, sitemap, or any other SEO elements. The only risk is opportunity cost—time spent on llms.txt instead of other marketing. But for most small businesses, the 30-60 minutes to create one is worthwhile.",
"faq": [
{
"q": "Where exactly do I put the llms.txt file on my website?",
"a": "Place it at the root of your domain: https://yourdomain.com/llms.txt (not in a subdirectory). Upload it via FTP, your hosting control panel, or your CMS. It should be a plain text file, not a Word doc or PDF. Test that it's accessible by visiting the URL in a browser."
},
{
"q": "How long should an llms.txt file be?",
"a": "Aim for 300-800 words total. Long enough to provide meaningful context, short enough that AI models actually process it. The file should take 2-3 minutes to read. If you're writing more than 1000 words, you're probably including too much detail."
},
{
"q": "Can an llms.txt file hurt my SEO or traditional search rankings?",
"a": "No. It's a separate text file that Google and other traditional search engines ignore. It doesn't affect your robots.txt, sitemap, or any other SEO elements. The only risk is opportunity cost—time spent on llms.txt instead of other marketing. But for most small businesses, the 30-60 minutes to create one is worthwhile."
}
]
}
```
FAQ
Want this running for your business every week?
One payment, lifetime access, your own AI agent drives it.
Start ranking