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.
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.
- Open /llms.txt and check that you see plain text, not a page.
- Upload a real file, or make the address answer 404.
- Check the content type and the encoding.
What it looks like, and fixed #
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.
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.
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
- Check Run a free tool or the full audit.
- Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
- Re-check Come back, check again, and watch each fix turn green.
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 #
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
- AI tools get different words or facts than visitors High priority
- Links in llms.txt do not work for bots Medium priority
- Question headings are not answered directly Medium priority
- The page does not open with a clear answer Medium priority
- llms.txt does not follow the proposed format Low priority
- No Markdown copy that AI tools can find Low priority
- Sections that a link cannot point to Low priority
- The Markdown copy is incomplete or badly formed Low priority