Deploying llms.txt: location, content type and safety blocks

Deploy llms.txt to your site correctly: which path to use, which Content-Type to send, and which URL forms the checking tool’s safety policy rejects outright.

About 3 min readError codes covered: SAFE_BLOCKED_SCHEMESAFE_BLOCKED_PORTSAFE_BLOCKED_CREDENTIALSSAFE_BLOCKED_PRIVATESAFE_BLOCKED_SELFSAFE_BLOCKED

This guide answers one task: put llms.txt online so that both the checking tool and AI tools can fetch it normally. There are three decisions: where to put it, which type to send, and how to write the URLs.

Where: the root path first

By the proposal’s convention the file lives at the site root, /llms.txt. Subpath documents (such as /docs/llms.txt) are allowed, but the root path is the “default discovery location”: our site import and most fetchers try the root path first.

Which type: text/plain or text/markdown

llms.txt is Markdown text. Either Content-Type: text/plain; charset=utf-8 or text/markdown works. Do not let the server return HTML: an abnormal type is recorded as abnormal by CONTENT_TYPE (a WARN when the type looks like HTML but the body shows no strong evidence of an SPA); if what comes back really is an SPA shell page (the body shows strong evidence), both CONTENT_TYPE and SPA_DETECTED FAIL (see returns 200 but cannot be read and the tests at the end).

Static hosting (Nginx, Caddy, the public/ directory on Vercel or Netlify) serves .txt as a text type by default, so no configuration is usually needed. Note the tiers: an abnormal type alone (HTML is returned but the body does not look like an SPA page) is a WARN; it becomes a FAIL only when the body also shows strong evidence of an SPA page. The scenario tested in this guide is the latter.

How to write URLs: forms the checking tool rejects outright

Fetching has a safety policy. The URL forms below make no network request and directly produce a failed report with the corresponding error code:

Error codeTriggerWhat to do
SAFE_BLOCKED_CREDENTIALSThe URL carries user:pass@Remove the credentials; a file that needs authentication should not be exposed publicly in the first place
SAFE_BLOCKED_SCHEMENot http(s), such as ftp:// or file://Switch to https://
SAFE_BLOCKED_PORTAn unusual port (other than 80/443)Publish on a standard port
SAFE_BLOCKED_PRIVATEA private or internal address (10.x, 192.168.x, 127.x and so on)Deploy to the public internet
SAFE_BLOCKED_SELFPoints to this site itselfCheck whether the wrong target address was entered
SAFE_BLOCKEDOther unclassified safety blocksSee the specific reason in the message field of the report

Pay particular attention to URLs with credentials: error messages and reports are redacted before they are made public, but the right thing to do is never to write credentials into links in llms.txt at all.

Test environment and results

Environment: Node v24.18.0, the llmstxtdb check engine connected directly to a local test server (an isolated 127.0.0.1 environment), tested on 2026-10-05.

  • https://demo:[email protected]/llms.txt → ok=false, error code SAFE_BLOCKED_CREDENTIALS (no network request was made; any public output other than the result object is redacted, and the test confirmed the credential string does not enter the public report. That redaction is covered by a separate regression test).
  • A normal file with Content-Type: text/plain; charset=utf-8 → spec=PASS, CONTENT_TYPE=PASS.
  • The same shell HTML returned once as text/html and once as text/plain → both cases trigger SPA_DETECTED FAIL (a joint judgment: a hit from either the type or body sniffing is enough to confirm).

After fixing, go back to the online check to verify.