Skip to content
Documentation
Rule catalogue

llmstxt.content-type

/llms.txt must be served as text — text/plain or text/markdown — not as a page

warningsite-wideguideline

Why it matters

Two failures with one remedy. A markdown file served as text/html is an llms.txt that clients misread: a browser renders it as one run-on paragraph. A home page served at /llms.txt is no llms.txt at all, and goflag reads the body rather than the header to tell the two apart. When every unknown .txt gets the same page, the cause is the catch-all and http.not-found reports it instead, so one defect is not counted twice.

What the finding looks like

The message goflag prints, with example values substituted.

warn llmstxt.content-type /llms.txt is served with text/html. The file is markdown, read by agents and by people: text/plain or text/markdown say so, while anything else tells a client to treat it as something it is not — text/html renders it as one run-on paragraph, and a download type does not render it at all.

How to fix it

The catalogue carries no snippet for a site rule: a cross-page rule builds its remedy from what the crawl found, so goflag attaches the fix to the finding itself rather than to the rule. Run it and read the finding.

Says who?

This rule is guideline, and it cites the documents below. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.