Skip to the content
Start free

llms.txt answers with a web page or the wrong type

/llms.txt or /llms-full.txt answers with an HTML page, or is not served as UTF-8 text, so AI tools may get a web page instead of your file.

Medium priority AI answers and citations

Why it matters #

Many sites send every unknown address to the home page, or to a not-found page with a 200 status. Then an AI tool that asks for /llms.txt gets a web page, and some tools may take that page as your llms.txt.

A real file sent without a text content type, or one that is not valid UTF-8, has a similar problem: each tool must guess what it is, and some characters may be shown wrongly.

How to fix it #

Upload a real Markdown file at /llms.txt, saved as UTF-8 and served as text/plain or text/markdown with charset=utf-8. If you do not have one yet, make the address answer 404 rather than a web page. Do the same for the optional /llms-full.txt.

Check it with the llms.txt Checker and Generator.

  1. Open /llms.txt and check that you see plain text, not a page.
  2. Upload a real file, or make the address answer 404.
  3. Check the content type and the encoding.

What it looks like, and fixed #

The problem
GET /llms.txt HTTP/1.1
Host: www.example.com

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html>
<html lang="en"><head><title>Page not found | Example</title>

A not found page sent with 200, so an AI tool may take this web page as your llms.txt.

Fixed
GET /llms.txt HTTP/1.1
Host: www.example.com

HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8

# Example Ltd

The real file, served as UTF-8 text. Before you have one, a plain 404 is better than a web page.

Fix it with your AI assistant #

Paste this into ChatGPT, Claude, Gemini or your coding agent. Fill in the words in [square brackets] first. It checks before it changes anything, changes only this, and tells you how to prove it worked.

Your instruction for the AI
My website [your website address] runs on [your platform, e.g. a Next.js site on nginx]. A check says /llms.txt or /llms-full.txt answers with an HTML page, or is not served as UTF-8 text. First fetch [your website address]/llms.txt and /llms-full.txt and show me the status, the Content-Type header and the first lines of each (or ask me to paste them). Tell me in plain words what is happening, for example a catch-all that answers with a page and 200. Then give me the fix: serve a real UTF-8 Markdown file as text/plain or text/markdown with charset=utf-8, through an exact rule before any catch-all, or a 404 if I have no file yet. Rules: back up first, do not change other addresses or my llms.txt content, and keep the catch-all for everything else. Give me exact lines and where they go. Finally, tell me to re-check with the URSY.com llms.txt Checker and Generator at ursy.com/llms-txt-checker/.

We find the problems, and help you fix them

  1. Check Run a free tool or the full audit.
  2. Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
  3. Re-check Come back, check again, and watch each fix turn green.

How the AI Fix Pack works, with a sample to download

Fix it on your platform #

WordPress

Make sure a real llms.txt file sits in the site root, or that your plugin really serves it. Check no plugin answers unknown addresses with a page and 200.

A hand-made site

On hosts that send every address to index.html, put the real llms.txt file in the published folder so it is served first.

Your server or hosting

Add exact rules for /llms.txt and /llms-full.txt above any catch-all rewrite, with default_type text/plain in nginx or AddType in Apache, and charset utf-8.

Check it is fixed #

Run the URSY.com llms.txt Checker and Generator (/llms-txt-checker/) again. It should get your Markdown file with a text content type, or a clean 404 if you have none yet.

Official source #

llmstxt.org: The /llms.txt file

Questions #

text/plain or text/markdown?

Either works for most tools. Add charset=utf-8 to whichever you choose.

Is a 404 for llms.txt bad?

No. It honestly says you have no file. A web page sent with 200 is the real problem.

More problems in AI answers and citations

See every problem in the library

For AI assistants and developers: Instructions for AI · Developers · How to cite URSY.com