How to Write an llms.txt File: Step-by-Step Guide
The concept is simple. The execution is where most businesses go wrong.
An llms.txt file lives at `yourdomain.com/llms.txt`. When AI crawlers like Perplexity's spider or Claude's web reader visit your site, they can read this file as a direct brief on your business — no inference required. You're telling them exactly what you do, where, and for whom.
The file itself is short. Done well, it's under 200 lines. But the businesses that get the most value from it don't just describe themselves — they answer the specific questions AI retrieval systems are always trying to resolve.
What AI models are trying to figure out
When an AI model encounters your business, it's working through four questions: What type of business is this? What does it specifically offer? Where does it operate? And is there enough corroborating evidence to justify a recommendation?
Your website probably answers these somewhere, spread across multiple pages. An llms.txt file answers them in one place, in a format that requires no interpretation.
Think of it as writing a brief that a knowledgeable assistant could use to accurately describe your business in any context.
The format
The llms.txt standard uses markdown-style formatting: a heading with your business name, a short description paragraph, then `##` sections to organize the details.
There's no official validation test and no parser that enforces syntax. What matters is that the file is plaintext, publicly accessible at your domain root, and contains accurate, specific information in a consistent structure.
Step 1: Write the header
The first line is your business name formatted as an H1 — a single `#` followed by your name (e.g., `# Westfield Plumbing`). Directly below it, write a 1-2 sentence plain English description:
``` Westfield Plumbing provides residential and commercial plumbing services in Hamilton and surrounding areas. We specialize in emergency repairs, bathroom renovations, water heater installation, and drain clearing. ```
Do not use marketing language. "Award-winning" or "best-in-class" adds no retrieval value. Write what you do and for whom, specifically.
Step 2: List your services explicitly
Create a `## Services` section with each service on its own line and a short description:
``` ## Services
- Emergency Plumbing Repairs: 24/7 for burst pipes, leaks, and drain failures - Bathroom Renovations: full remodels including rough-in, fixtures, and final connection - Water Heater Installation: tank and tankless systems, gas and electric - Drain Cleaning: snaking, hydro-jetting, camera inspection - Backwater Valve Installation: flood protection for Hamilton homeowners ```
The descriptions matter. "Emergency plumbing" is generic. "24/7 for burst pipes, leaks, and drain failures in Hamilton" is something an AI model can match against the query "emergency plumber Hamilton at 2am." Use the language your customers would use when asking an AI, not your internal service names.
Step 3: Specify your service area
This is the section most businesses skip or handle too vaguely. An AI model answering a location query needs to know where you operate.
``` ## Service Area
Primary: Hamilton, ON (downtown, East Hamilton, West Mountain, Ancaster, Dundas) Also serving: Burlington, Stoney Creek, Waterdown, Flamborough
We do not serve the GTA or Toronto. ```
Two things worth doing here. First, naming specific neighborhoods within your primary city gives AI models more precise location signals than just "Hamilton." Second, the negative statement helps prevent false-positive citations — you don't want to show up when someone asks for a Toronto plumber.
Step 4: Add factual trust signals
AI models factor credibility into recommendations. A short `## About` section with verifiable facts is worth including:
``` ## About
- Licensed plumbing contractor, Ontario College of Trades - In business since 2009 - 200+ Google reviews, 4.9 average rating - Member: Greater Hamilton Contractor Network ```
Keep it factual. Years in business, review counts, licenses, and industry memberships are all meaningful to AI retrieval. Superlatives are not.
Step 5: Link to your key pages
A `## Key Pages` section tells AI crawlers which pages on your site are most relevant for which queries:
``` ## Key Pages
- Emergency Plumbing: 24/7 emergency service Hamilton https://westfieldplumbing.ca/emergency - Bathroom Renovation Plumbing: rough-in, fixtures, full remodels https://westfieldplumbing.ca/bathroom - Drain Cleaning: residential drain service Hamilton https://westfieldplumbing.ca/drain-cleaning - Service Area: full list of cities and neighborhoods served https://westfieldplumbing.ca/service-area ```
This functions like a curated sitemap for AI retrieval. You're directing the model to your strongest pages rather than letting it guess which ones matter most.
Common mistakes
**Being too vague.** "We offer a full range of services" is useless to an AI retrieval system. Enumerate your services. Name your cities. Give specifics something can act on.
**Writing it like marketing copy.** Phrases like "committed to excellence" and "trusted by thousands" add no retrieval value. This file is for machines reading quickly, not humans you're trying to impress.
**Wrong URL.** The file must be at `yourdomain.com/llms.txt` — the root domain. Not a subdirectory, not behind a login, not on a subdomain.
**Listing services without location.** An AI model answering a local query needs both. Services without a service area makes you effectively uncitable for location-specific searches.
**Blocking AI crawlers in robots.txt.** If your robots.txt blocks GPTBot, PerplexityBot, or ClaudeBot, they won't read your llms.txt regardless. Check your robots.txt before publishing the file.
How to verify it's working
Visit `yourdomain.com/llms.txt` directly and confirm it renders as plain text in your browser. If it downloads as a file, returns a 404, or prompts a login, fix that first.
For Perplexity (which does live web search on every query), citation improvements can appear within days to a few weeks of publishing. Run test queries — "best [service] in [your city]" — and track your results week over week.
For ChatGPT and Claude, the lag is longer because they depend on crawl schedules and training updates. Our Signal Check data consistently shows businesses with a well-formed llms.txt file scoring meaningfully higher than comparable businesses without one. It's among the highest-leverage fixes per hour of effort on our list.
Once the file is live, the next question is whether it's actually moving your citation score. A Signal Check at sourcepull.ca runs 40 real queries across ChatGPT, Perplexity, Claude, and Gemini — and flags whether your llms.txt is present, complete, and accessible to crawlers. It takes a few minutes and shows you exactly where your AI visibility stands.
See how your business scores on AI platforms.
Check your score — free