How-To Guide

How to create an llms.txt file

An llms.txt file is a simple markdown file at your domain root that gives AI systems a clean, curated map of your most important content. Creating one takes about 20 minutes and helps engines like ChatGPT and Perplexity find and understand the pages you most want cited. This guide covers the exact format, what to include, and how to publish and validate it.

6 steps

Step-by-Step

  1. 1

    Understand what llms.txt is for

    The llms.txt standard is a markdown file that lists your key pages with short descriptions, so language models can quickly grasp your site structure without crawling everything. It sits at yourdomain.com/llms.txt, similar in spirit to robots.txt but aimed at AI comprehension rather than crawl control. Knowing its purpose keeps you from stuffing it with every URL you own.

  2. 2

    List your most important pages

    Pull together the pages you most want AI engines to know about: your core product pages, top guides, documentation, and about page. Keep this to your genuinely important content rather than a full sitemap dump. Each entry will become a link with a one-line description of what the page covers.

  3. 3

    Write the file in the correct format

    Start with an H1 that is your site or brand name, then an optional blockquote summary of what you do. Group links under H2 headings like Docs, Guides, and Products, using markdown link syntax followed by a colon and a short description. This structure is what parsers expect, so stick to it closely.

  4. 4

    Add an optional detailed section

    The standard supports an Optional H2 section for links that are useful but not essential, which lets AI systems skip them when context is tight. Use it for secondary resources such as changelogs or older posts. This keeps your core list focused while still exposing extra material when there is room.

  5. 5

    Host it at your domain root

    Upload the file so it is reachable at yourdomain.com/llms.txt with a plain text content type. On most platforms you can place it in the public root directory alongside robots.txt. Confirm it loads in a browser and is not behind a login or redirect.

  6. 6

    Validate and keep it current

    Run your file through a validator to catch broken links and format errors before you rely on it. The GrandRanker llms.txt validator checks structure and flags dead URLs, and the llms.txt generator can build the whole file for you from your sitemap. Revisit it whenever you launch major new pages.

What to include and what to leave out

Include the pages that best represent what you do and that you would want an AI to cite: product overviews, pricing, flagship guides, documentation, and your about page.

Leave out thin pages, duplicate content, tag archives, and anything you would not want quoted. The value of llms.txt is curation, so a tight list of 15 to 40 strong links usually beats a sprawling one.

Write each description as a plain, factual sentence. A model reads these to decide what a page is about, so clarity matters more than marketing flair.

Common mistakes when creating llms.txt

The most common mistake is treating llms.txt like an XML sitemap and listing every URL. That defeats the purpose, which is to highlight your best content.

Another is getting the markdown structure wrong, such as skipping the H1 title or using bullet points instead of proper link syntax. Parsers expect a specific shape, so a validator is worth running.

Finally, people publish it once and forget it. If your site changes and the file points to dead or outdated pages, it can do more harm than good.

How GrandRanker automates this

Writing and maintaining an llms.txt file by hand is easy to get wrong. GrandRanker includes a free llms.txt generator that reads your site and produces a correctly formatted file with sensible descriptions.

It also offers a validator that checks your existing file for structure errors and broken links. Together they take the manual work and guesswork out of keeping the file accurate as your site grows.

Frequently Asked Questions

Let GrandRanker Do This for You

Skip the manual work and generate a correct file in seconds with the free GrandRanker llms.txt generator, then take the quiz to see what else will boost your AI visibility.