Skip to content
Go back

How to Validate an llms.txt File Before Publishing

Published:  at  10:00 AM

How to Validate an llms.txt File Before Publishing

A broken llms.txt is worse than no llms.txt. If the file is malformed, the tools and models that do read it get a confusing or incomplete picture of your site — the opposite of what you wanted. The good news: the llms.txt format is simple, so validation is quick once you know what to check.

This is a practical, no-fluff checklist you can run before every publish.

What the format actually requires

The llms.txt format (from llmstxt.org) is intentionally minimal Markdown:

That’s the whole structure. Most validation problems are deviations from this shape.

The pre-publish checklist

1. Exactly one H1, and it’s first

The file should open with one # Title line. Common mistakes:

2. A summary blockquote

Right after the title, include a one-line > blockquote describing what the site or project is. It gives any reader — model or human — instant context. It’s optional in the spec, but recommended in practice.

Use ## headings to group related links: ## Documentation, ## API Reference, ## Guides. A flat dump of links with no sections is hard to navigate. If you have more than a handful of links, group them.

Check every link for:

A bare - [Quickstart](https://…) is far less useful than - [Quickstart](https://…): Get set up in five minutes. The description tells a model why the link matters and when to follow it. Add one to every list-item link.

6. Keep it concise

llms.txt is an index, not an archive. If your file is very large (tens of kilobytes or more), that’s a signal you’re stuffing full content where a curated link list belongs.

7. Consider a companion llms-full.txt

If you genuinely have a lot of long-form content models might want in full, publish a separate llms-full.txt with the complete text, and keep llms.txt as the lightweight map that links to it.

A quick example of a clean file

# Acme Docs

> Acme is an API for sending transactional email. This file indexes the docs and reference.

## Getting Started

- [Quickstart](https://acme.dev/quickstart): Send your first email in five minutes
- [Authentication](https://acme.dev/auth): API keys and scopes

## API Reference

- [Messages API](https://acme.dev/api/messages): Create and send messages
- [Webhooks](https://acme.dev/api/webhooks): Delivery and bounce events

## Optional

- [Changelog](https://acme.dev/changelog): Release notes

One H1, a summary, grouped sections, described links, no duplicates. That’s the target.

Validate it automatically

Running the checklist by hand works, but it’s easy to miss a duplicate URL or a missing description in a long file. Our free llms.txt validator checks all of the above in one pass and gives you a structure score plus specific, line-aware suggestions.

You can validate in two ways:

Either way you’ll see exactly what to fix before — or after — you publish.

After you fix the issues

Once the validator is happy:

  1. Save the file as llms.txt and upload it to your domain root (https://example.com/llms.txt).
  2. Re-run the validator against the live URL to confirm it’s served as plain text and reachable.
  3. Re-check it whenever you restructure your site or add major sections.

The bottom line

Validation takes a couple of minutes and saves you from shipping a file that quietly misleads the tools reading it. Run the checklist, fix the structure, and confirm with the validator before you publish.

Don’t have a file yet? Generate a clean draft from your site with the llms.txt generator, then validate it. And if you’re still deciding whether you need one at all, see When llms.txt Makes Sense.



Previous Article
Google Says You Don't Need llms.txt. Should You Still Create One?
Next Article
llms.txt vs sitemap.xml vs robots.txt: What's the Difference?