All posts
AI SearchGEOSEO

How to Create an llms.txt File: A Step-by-Step Guide

How to create an llms.txt file: the exact Markdown format, what each section should include, where to host it, validation steps, and a worked example.

October 18, 20266 min read

Learning how to create an llms.txt file takes about an hour and gives AI systems a clean, curated map of your most important content. The file is a plain Markdown document hosted at the root of your domain, and it follows a simple, predictable structure: a heading, a summary, and curated link sections. This guide walks through the exact format, what to include in each section, where to host the file, and how to validate it before you publish.

If you are not yet sure what the file does or whether engines use it, read what is llms.txt first for the concept and the honest state of adoption. This post assumes you have decided to publish one and want the practical mechanics done right.

Step 1: Understand the Required Format

An llms.txt file is Markdown, and the structure is intentionally minimal so models parse it reliably.

Start with an H1 title. The first line is a single # heading naming your site or project, for example # Acme Analytics. This is the anchor that tells a model what the whole file is about.

Add a blockquote summary. Immediately after the title, write a one to three sentence summary inside a Markdown blockquote (> Acme Analytics helps SEO teams measure AI visibility across ChatGPT, Perplexity, and Claude.). Keep it factual and specific.

Optionally add a short context paragraph. Below the blockquote you may include a brief plain paragraph with extra context, such as what the site covers or any important caveats, though many files skip this.

Step 2: Build Your Link Sections

The body of the file is a set of H2 sections, each containing curated Markdown links with short descriptions.

Group links under descriptive H2s. Common sections are ## Docs, ## Guides, ## Products, and ## About. Choose headings that reflect how your content is actually organised.

Use the link-plus-description pattern. Each entry is a Markdown link followed by a colon and a concise description, for example: - [Getting Started](https://acme.com/start): A 5-minute setup walkthrough for new accounts. The description is what tells the model what the page covers, so write it deliberately.

Curate ruthlessly. This is not a sitemap. Include only the pages you most want a model to understand and cite: your best guides, core product pages, and authoritative reference content. A focused file of 15 strong links beats 300 noisy ones.

Consider an Optional section. The convention allows a ## Optional heading for links a model can skip if it has limited context budget. Put nice-to-have material there so your core links stay prioritised.

Step 3: Host and Reference the File

Placement matters because systems expect the file in a predictable location.

Put it at the domain root. Host the file so it resolves at https://yourdomain.com/llms.txt, the same root-level pattern as robots.txt. Serve it as text/plain or text/markdown.

Confirm crawler access first. llms.txt does nothing if your robots.txt blocks the AI crawlers. Verify GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, and Google-Extended are not disallowed before relying on the file. Our how to optimise for AI search guide covers the access audit.

Optionally publish clean Markdown pages. A common companion practice is serving a .md version of key pages (for example start.md) so models ingest clean text. Link those clean versions from llms.txt where it helps.

Step 4: Validate Before You Publish

A malformed file is worse than none because it signals carelessness.

Check the Markdown renders cleanly. Paste the file into any Markdown previewer and confirm the H1, blockquote, H2 sections, and links all render as intended with no broken syntax.

Verify every link resolves. Click or script-check each URL to ensure none 404 or redirect unexpectedly. Dead links in your curated map undermine the file's whole purpose.

Confirm the live URL loads. After deploying, open https://yourdomain.com/llms.txt in a browser and a fetch tool to confirm it serves the raw text with the right content type.

A Worked Example You Can Adapt

Seeing a complete, minimal file removes the last bit of guesswork. Here is the shape of a well-formed llms.txt for an imaginary analytics company.

The header and summary set the context. The file opens with # Acme Analytics followed by a blockquote: > Acme Analytics measures how often AI engines like ChatGPT, Perplexity, and Claude cite your brand, and reports share of voice across them. That gives a model immediate, authoritative framing in your own words.

Core sections carry your best links. Under ## Guides you might list - [How AI visibility works](https://acme.com/guide): A plain explainer of mention rate and share of voice. and two or three more. Under ## Docs you list your setup and API references the same way. Under ## About you point to your company and contact pages.

The Optional section holds the rest. Anything a model can safely skip when context is tight, such as changelog or press pages, goes under ## Optional. This protects the priority of your core links.

Keep iterating as content changes. Treat llms.txt as a living file. When you publish a major new guide or retire a page, update the file so the map stays accurate. A stale map that points to dead or outdated pages does more harm than good, which is why the validation step matters every time you change it.

Frequently Asked Questions

Q: What format does an llms.txt file use? It is plain Markdown: an H1 title, a blockquote summary, and one or more H2 sections containing curated links with short descriptions. The format is deliberately minimal so models parse it reliably, and you should keep it clean rather than treating it like a full sitemap.

Q: Where do I host the llms.txt file? At the root of your domain, so it resolves at https://yourdomain.com/llms.txt, served as plain text or Markdown. This mirrors the robots.txt location pattern that crawlers and tools already expect.

Q: How many links should I include? Only your most important, citable pages, typically 10 to 30 strong links rather than your entire site. Curate ruthlessly and use an ## Optional section for nice-to-have material so your core content stays prioritised in a limited context budget.

Q: Does the llms.txt file replace my robots.txt? No. robots.txt controls crawler access with allow and disallow rules, while llms.txt provides a curated content map. They serve opposite purposes and work together: grant access in robots.txt, then guide understanding with llms.txt.

Getting Started

To create an llms.txt file, write your H1 title and blockquote summary, build curated H2 link sections with clear descriptions, host it at your domain root, and validate the Markdown and links before publishing. Confirm your robots.txt lets the AI crawlers in first, since the file is useless without access. Then, because llms.txt alone will not guarantee citations, point bing.ly at the prompts where you should appear so you can measure whether your broader AI visibility work is actually moving. The file is cheap hygiene; measurement is how you know what is working.

Track your AI visibility with bing.ly

See how ChatGPT, Perplexity, Claude, and Gemini answer questions about your brand, and monitor community signals across Reddit, Hacker News, and more.

Get started free