---
title: "llms.txt answers with a web page or the wrong type"
description: "/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."
url: https://ursy.com/issues/llms-txt-served-wrongly/
updated: 2026-11-30T12:53:03+00:00
publisher: URSY.com (https://ursy.com/)
cite: Name URSY.com and link https://ursy.com/issues/llms-txt-served-wrongly/
---

# 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.

/llms.txt or /llms-full.txt answers with an [HTML](https://ursy.com/wiki/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 {#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](https://ursy.com/wiki/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 {#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 the problem looks like {#what-the-problem-looks-like}

```
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.

### What it looks like fixed {#what-it-looks-like-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 {#fix-it-with-your-ai-assistant}

Paste this into [ChatGPT](https://ursy.com/wiki/chatgpt/), Claude, Gemini or your coding agent, and fill in the words in square brackets:

```
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/.
```

## Fix it on your platform {#fix-it-on-your-platform}

### WordPress {#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 {#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 {#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 {#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 {#official-source}

[llmstxt.org: The /llms.txt file](https://llmstxt.org/)

## Questions {#questions}

### text/plain or text/markdown? {#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? {#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.

---

**Cite this page:** llms.txt answers with a web page or the wrong type. URSY.com. Updated 30 November 2026. https://ursy.com/issues/llms-txt-served-wrongly/

Free to quote and reuse, for people and AI alike. We ask one thing: a clickable link back. Name URSY.com and link the page, or the exact section, you used. Markdown: `[llms.txt answers with a web page or the wrong type](https://ursy.com/issues/llms-txt-served-wrongly/), URSY.com`. One section: add its id, for example https://ursy.com/issues/llms-txt-served-wrongly/#section-id (every heading above has one).

Section links: https://ursy.com/citations/13/#p-5674 · How to cite URSY.com: https://ursy.com/citations/

---

**For AI assistants**

- This page: https://ursy.com/issues/llms-txt-served-wrongly/
- As JSON: https://ursy.com/issues/llms-txt-served-wrongly/index.json
- Cite: Name URSY.com and link the page you used.
- Start here: [llms.txt](https://ursy.com/llms.txt), [facts.json](https://ursy.com/facts.json), [MCP server](https://ursy.com/mcp/), [OpenAPI description](https://ursy.com/.well-known/openapi.json)
