这是就绪度审计,不是提及监测
部署

如何生成并部署 llms.txt 文件

在域名根目录上组织、托管并验证 /llms.txt 文件的实用指南,也如实说明它不会为 AI 可见度做什么。

作者 Alex Xu(作者页为英文)阅读约 3 分钟

llms.txt 是一个放在域名根目录、用 Markdown 写的纯文本文件,它告诉语言模型你网站上哪些部分重要。 它是一项约定,不是标准,添加它大约需要十分钟。本指南讲格式、讲部署,也讲怎么验证它确实能被访问到。

What robots.txt, sitemap.xml and llms.txt each decideA crawler arrives and meets three files in order. robots.txt decides whether it may fetch at all. sitemap.xml tells it which pages exist. llms.txt tells it what the site is about once it is reading. Each answers a different question and none replaces another.A crawler arrivesrobots.txtsitemap.xmlllms.txtMay it fetch?Permission.Empty file = allowed.What exists?Discovery.Missing = still crawled.What is it?Comprehension.Missing = inferred.None of the three substitutes for another.An llms.txt listing pages does not make them discoverable, because discovery is sitemap.xml.A sitemap submitted does not grant permission, because permission is robots.txt.
Read left to right in the order a crawler meets them: permission, then discovery, then comprehension.

什么是 llms.txt?

/llms.txt 是一项提案中的约定,用来给 AI 系统一份经过整理、机器可读的网站摘要。 它不要求模型从 HTML 里推断结构,而是直接交给模型一份简短的 Markdown 文档, 里面有项目摘要和最重要的一批链接。配套的 /llms-full.txt 承载展开后的内容本身。

文件里写什么?

约定刻意保持简单:一个写着你站点名称的 H1,一段引用块摘要,然后是若干由带注释的链接组成的 H2 小节。

# Your Company

> One or two sentences describing what you do and who it is for.

## Core pages
- [Product overview](https://example.com/product): what it does.
- [Pricing](https://example.com/pricing): plans and limits.

## Documentation
- [Getting started](https://example.com/docs/start): setup in five minutes.

## Optional
- [Blog](https://example.com/blog): release notes and research.

有两条规则比格式更重要:摘要那一行是模型最可能引用的话, 所以要把它写成信息密集的事实句,而不是一句标语;以及每个链接都必须能打开, 因为一个满是 404 的文件比没有文件更糟。

文件放在哪里?

它必须能从准确路径 https://your-domain.com/llms.txt 访问到——是域名根目录, 不是某个子目录。怎么发布取决于你的技术栈:用 Next.js 就放进 public/llms.txt; 大多数静态托管就放进发布目录。不要用重定向:直接用 text/plain 内容类型提供它。

llms.txt 真的能提升 AI 可见度吗?

我们能展示它的成本;我们不能展示它提升了可见度。 我们能打开的两份爬虫文档——OpenAI 的帮助中心和 Anthropic 于 2026 年 4 月 7 日发布的爬虫文章——都没有提到这个文件; 两份文档都指明 robots.txt 是它们遵守的机制。

它今天真正帮到的是:会主动抓取上下文的文档站和编码代理,以及任何接受「整理过的入口」的检索系统。 诚实的说法是:一个很小、很便宜的信号——值得加,不值得当作排名因素。

我如何验证它已经上线?

  1. 在浏览器里请求 https://your-domain.com/llms.txt。它应当以纯文本呈现, 而不是被下载或返回 404。
  2. 确认响应是 200,内容类型是 text/plain。
  3. 检查 robots.txt 没有禁止该路径,并且你的防火墙没有拦截爬虫的 user-agent。
  4. 把文件里的每个链接都点一遍。失效链接是最常见的缺陷。

你可以用 llms.txt Studio(英文)自动完成以上全部检查,或者先用 免费 GEO 扫描器审计爬虫访问。

关于部署 llms.txt 的问题

文件到底放在哪里?

域名根目录,也就是 https://your-domain.com/llms.txt 直接返回 HTTP 200 和正文的那个位置。跳到登录页的重定向,或者一个 HTML 错误页,都算没有提供。

发布 llms.txt 会提升排名吗?

我们没有找到任何一份承诺会读取它的爬虫文档;我们能打开的两份——OpenAI 的帮助中心和 Anthropic 的爬虫文章——指定的都是 robots.txt。它很便宜,对真正会抓取它的读者来说值得做,但我们不把它当作排名因素。

如何确认它被正确提供?

请求这个 URL,然后读返回的内容:应当是 200 的 Markdown,而不是 404 或一整页 HTML。只看状态码不够,因为空文件也会返回 200。

证据与来源

GEO can boost visibility by up to 40% overall in generative engine responses, and in the paper's Table 1 the best of the tested methods improve on the no-optimization baseline by 41% and 28%. — Generative Engine Optimization, KDD 2024

本站使用的权重依据那项测量,因此可引用性与证据各占 11%,而 AI 上下文文件维度占 5%。 完整权重,以及单 URL 扫描看不到的那部分图景,都在 中文方法论页面里。

Primary sources