llms.txt 驗證器:常見的 8 種格式錯誤及免費檢查工具
llms.txt validator: the 8 format mistakes we see, and a free tool to catch them
llms.txt 驗證器以免費網頁工具形式提供,可生成或驗證檔案,並檢查 8 類常見格式錯誤;工具在瀏覽器內運行,不會傳送資料。網站可能把未知路徑導向首頁,令 /llms.txt 回傳 HTML,因此還要檢查狀態碼及 Content-Type。llms.txt 目前只是提案;在 2026 年 10 月檢查的 751 個熱門網站中,約一成發布了有效檔案。
We check /llms.txt on every site our auditor scans, and most files that exist fail on format, not on content. So we put the same checks in a free page: fill in a few fields to generate a file, or paste yours to validate it. It runs in your browser and sends nothing anywhere.
Tool: llms.txt generator and validator (also in Spanish)
The format in one minute
The proposal at llmstxt.org defines the parts in this order. Only the first is required.
- An H1 with the site name:
# Example Store - A blockquote summary:
> Example Store sells handmade ceramics... - Optional paragraphs or lists, no headings
- H2 sections, each a list of links:
- [name](url): notes
One section can be called ## Optional for links an agent may skip when it needs a shorter context.
The mistakes the validator flags
| Code | What triggers it | Fix |
|---|---|---|
missing-h1 |
No line starts with #
|
Start the file with # Your site name
|
h1-not-first |
Front matter, a comment or text before the H1 | Move the H1 to line 1 |
multiple-h1 |
More than one H1 | Keep one, use ## for sections |
missing-summary |
No > line before the first section |
Add one right after the H1 |
heading-in-details |
An H3 to H6 before the first section | Use paragraphs, or make it a ## section |
no-link-sections |
No section holds a link | Add a ## section with links |
empty-section |
A section with no links | Add links or drop the heading |
bad-list-items |
A bare URL or plain text in a section list | Write - [name](url): note
|
It also warns about relative links: use full URLs so the file still works when a tool reads it on its own.
The failure a validator cannot see
The most common problem is not in the file at all. Many hosts answer unknown paths with the home page, so /llms.txt returns 200 with HTML. Tools then treat the file as absent. Check it with:
curl -i https://yoursite.com/llms.txt
You want status 200 and a Content-Type that is not text/html.
Should you bother?
llms.txt is a proposal, not an IETF or W3C standard, and nothing obliges an AI company to read it. It does not grant or block access either: that is still robots.txt and your CDN. In our October 2026 check of 751 popular sites, about 1 in 10 published a valid one (9.1% in Mexico, 11.3% in the US sample, 8.3% in Canada). It is cheap documentation; fix robots.txt first.
Written with AI and reviewed before publishing. If you spot an error, tell us in the comments.
來源:DEV Community · dev.to