如何在 WordPress 加入 llms.txt,以及它能與不能做到的事
How to add an llms.txt file to WordPress (and what it will and won't do)
llms.txt 是一個以 Markdown 編寫的網站摘要,列出網站簡介和重要頁面;在 WordPress 加入它,需生成檔案、檢查連結、上載至網站根目錄,再確認檔案以純文字載入。文章指出,沒有公開確認 ChatGPT、Perplexity 或 Google AI Overviews 會用 llms.txt 決定引用內容,因此它不是提升排名的工具。
An llms.txt file is a Markdown file served at yoursite.com/llms.txt that gives AI tools a short, curated map of your site: what it is, and which pages matter. On WordPress you add it in four steps: generate the file, check every URL in it, upload it to the site root, and verify it loads as plain text.
Here's the full process, plus the limits you should know before you spend time on it.
What llms.txt actually is
The format comes from the proposal at llmstxt.org. The structure is simple:
# Your Site Name
> One or two sentences describing what the site/business is.
## Key pages
- [Pricing](https://example.com/pricing): plans and what each includes
- [Docs](https://example.com/docs): setup guides
## Optional
- [Blog](https://example.com/blog): articles and updates
- One H1 with the site or project name
- A blockquote summary
- H2 sections containing lists of links, each with a short description
It is not a replacement for robots.txt or sitemap.xml. Robots controls crawling, the sitemap lists URLs, and llms.txt is a curated, human-readable summary.
Step 1: Generate the file
You can write it by hand for a small site. For a bigger one, start from a generator and edit the result. I build CiteProof, and our free llms.txt generator reads your homepage and sitemap.xml and builds the file only from URLs it finds on the site. If you already have an llms.txt, it detects it and proposes an improved version. The free version allows 3 analyses per day per IP.
Whichever tool you use, treat the output as a draft.
Step 2: Check every line
This is the step most people skip:
- Open every URL in the file. No 404s, no redirects, no staging links.
- Keep it short. List the pages you'd actually want an assistant to read first, not your whole sitemap.
- Write descriptions a human would understand. Skip keyword lists.
- Use the same language as the site.
Step 3: Upload it to the WordPress root
The file has to be reachable at https://yourdomain.com/llms.txt, not inside /wp-content/uploads/.
Option A — Hosting file manager / SFTP
- Open your host's file manager (or connect via SFTP).
- Go to the folder that contains
wp-config.php. That's the root. - Upload
llms.txtthere.
Option B — A plugin
Some SEO plugins can now generate and serve llms.txt. Check yours before adding another one, and don't run two at once.
Option C — CiteProof plugin
If you use CiteProof, the official WordPress plugin can apply the llms.txt fix in one click, along with schema and FAQ fixes.
Step 4: Verify
curl -I https://yourdomain.com/llms.txt
You want a 200 status and a text content type. Then open it in a browser and make sure caching or security plugins aren't returning an HTML page instead.
What llms.txt won't do
Being honest here saves you time: there's no public confirmation that ChatGPT, Perplexity or Google AI Overviews use llms.txt when deciding what to cite. Think of it as cheap, low-risk housekeeping, not a ranking lever. Whether AI assistants recommend you still depends on your content, structured data, and whether other sources mention you.
If you want to know where you actually stand, check whether AI engines cite your site for the questions your customers ask. That's the gap llms.txt alone won't close.
Disclosure: I'm the founder of CiteProof.
來源:DEV Community · dev.to