# WordPress 网站的 GEO 最佳实践

> WordPress 的 GEO 问题多半出在设置上，不在内容上。先查「建议搜索引擎不索引」选项、插件实际输出的 robots.txt、拦截爬虫的防火墙或 CDN；再保留一份 Sitemap、一个结构化数据来源，用日志和搜索报告衡量。

- URL: https://geo.casa/zh-cn/best-practices/wordpress/
- 指南 · 官方文档已说明
- 审核于: 2026-10-28

本文写给运营 WordPress 网站、希望出现在 Google、ChatGPT、Perplexity 和 Copilot AI 回答里的站长。它按顺序检查决定 AI 搜索能否读取页面的 WordPress 设置、插件和托管层。有后台权限、能看到 CDN 或防火墙设置的话，第一轮检查大约半天。

## 一句话路线

1. 确认 WordPress 本身没有要求搜索引擎回避。
2. 查看 WordPress 和插件实际输出的 robots.txt，放行 AI 搜索爬虫。
3. 确认安全插件、主机和 CDN 没有拦截这些爬虫。
4. 只保留一份 XML Sitemap（核心自带或一个 SEO 插件），并提交。
5. 只让一个插件输出结构化数据，并与页面可见内容一致。
6. 确认主题和页面构建器把正文放在 HTML 里。
7. 用爬虫日志和搜索引擎的 AI 报告衡量效果。

## 1. 关掉「建议搜索引擎不索引本站点」

WordPress 最常见的屏蔽就是一个复选框。测试站搭建时通常会勾上，上线后经常忘了取消。

> **官方文档已说明:**
> WordPress 的「设置 › 阅读」页面有「建议搜索引擎不索引本站点」选项。自 5.3 版起，勾选后每个调用 `wp_head()` 的页面（标准主题都会调用）都会加上 `noindex,nofollow` 的 robots meta 标签。WordPress 说明，这个选项并不阻止访问，只是一个由搜索引擎决定是否遵守的请求。
>
> 参考来源: [WordPress.org: Settings Reading screen](https://wordpress.org/documentation/article/settings-reading-screen/)

> **官方文档已说明:**
> 要作为 AI 概览或 AI 模式中的辅助链接出现，页面「必须已被编入索引，并且符合在 Google 搜索中显示摘要的条件」。
>
> 参考来源: [Google Search Central: AI features and your website](https://developers.google.com/search/docs/appearance/ai-features)

带 `noindex` 的页面过不了这一关。确认复选框未勾选，再打开线上页面源代码搜索 `noindex`。

## 2. 读你实际输出的 robots.txt

没有实体文件时，WordPress 会生成虚拟的 robots.txt。SEO 插件可以修改它，服务器上的实体 `robots.txt` 文件则会取代它。直接打开 `https://你的域名/robots.txt`，以实际内容为准，不要只看设置页面。

> **官方文档已说明:**
> OpenAI：「退出 OAI-SearchBot 的网站不会出现在 ChatGPT 搜索回答中，但仍可能以导航链接的形式出现。」禁止训练爬虫 GPTBot 是单独的设置，不影响搜索。
>
> 参考来源: [OpenAI: Overview of OpenAI crawlers](https://developers.openai.com/api/docs/bots)

- 想出现在相应产品里，就放行 `Googlebot`、`Bingbot`、`OAI-SearchBot`、`Claude-SearchBot` 和 `PerplexityBot`。
- 训练爬虫（`GPTBot`、`ClaudeBot`、`Google-Extended`）单独决定。各标识的规则见 [为 AI 爬虫配置 robots.txt](https://geo.casa/zh-cn/crawling-indexing/robots-txt-ai-crawlers/)。
- 留意插件里的「屏蔽 AI 机器人」开关，检查它实际写入了哪些标识。

## 3. 检查安全插件、主机和 CDN

robots.txt 放行了，防火墙却返回 `403` 或验证页，爬虫照样进不来。在 WordPress 上，这道防火墙可能是安全插件、主机商的防机器人功能，也可能是站点前面的 CDN。

> **官方文档已说明:**
> Google 把「确保 robots.txt 以及任何 CDN 或托管基础设施允许抓取」列为对其 AI 功能仍然重要的做法之一。
>
> 参考来源: [Google Search Central: AI features and your website](https://developers.google.com/search/docs/appearance/ai-features)

> **官方文档已说明:**
> Cloudflare 旧版「Block AI bots」设置会拦截它归类为 AI 训练爬虫的已验证机器人，该设置定于 2026 年 9 月 15 日弃用。从那天起，新域名的默认设置会在展示广告的页面上拦截训练类和代理类机器人，搜索类爬虫仍然放行。同时用于搜索和训练的混合用途爬虫，在 AI 训练相关选项下会被拦截。
>
> 参考来源: [Cloudflare: Block AI Bots](https://developers.cloudflare.com/bots/additional-configurations/block-ai-bots/)

- 列出互联网到 WordPress 之间的每一层：CDN、主机防火墙、安全插件、限流规则。
- 在每一层找到机器人或 AI 相关设置，记下它拦了什么。
- 在日志里确认已验证的搜索爬虫拿到的是 `200`（见第 7 步）。

> 在 WordPress 上，robots.txt 很少是唯一的守门人。动笔写新内容之前，先把每一道能说「不」的关卡查一遍。

## 4. 一份 Sitemap，并提交

> **官方文档已说明:**
> 自 WordPress 5.5 起，核心在 `/wp-sitemap.xml` 提供 Sitemap 索引，收录公开的文章类型、分类法和作者归档，虚拟 robots.txt 会指向它。站点设置为建议搜索引擎不索引时，核心 Sitemap 会关闭。每个 Sitemap 默认最多 2,000 个网址。
>
> 参考来源: [WordPress.org (Make WordPress Core): New XML Sitemaps Functionality in WordPress 5.5](https://make.wordpress.org/core/2020/07/22/new-xml-sitemaps-functionality-in-wordpress-5-5/)

SEO 插件通常会用自己的 Sitemap 替换核心版本。二选一，然后：

- 确认 Sitemap 能打开，收录的是重要页面，而不是标签归档或附件页。
- 在 Google Search Console 和 Bing 网站管理员工具中提交。Bing 为 Copilot 提供数据。
- 背景知识见 [XML 站点地图（Sitemap）](https://geo.casa/zh-cn/crawling-indexing/xml-sitemaps/) 和 [XML Sitemap 与 IndexNow 对比](https://geo.casa/zh-cn/tools-protocols/sitemaps-vs-indexnow/)。

## 5. 一个结构化数据来源，与页面一致

SEO 插件会自动输出 schema.org 标记。问题常出在主题、插件和页面构建器各输出一套，或者标记描述了页面上没有的东西。

> **官方文档已说明:**
> Yoast SEO 会自动以 JSON-LD 输出一张相互关联的 schema 图谱，列出的类型包括 Organization、Person、WebPage、Article 和 Breadcrumb。
>
> 参考来源: [Yoast: Structured data - Yoast SEO Features](https://yoast.com/features/structured-data/)

> **官方文档已说明:**
> 「不要标记读者在页面上看不到的内容。」Google 也不保证正确的标记一定会出现在结果中。
>
> 参考来源: [Google Search Central: General structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies)

> **官方文档已说明:**
> Google 表示，出现在 AI 概览或 AI 模式中不需要添加任何特殊的 schema.org 结构化数据。
>
> 参考来源: [Google Search Central: AI features and your website](https://developers.google.com/search/docs/appearance/ai-features)

所以把结构化数据当作基础整理来做。用它说明网站由谁发布（[Organization 结构化数据](https://geo.casa/zh-cn/content-structured-data/organization-structured-data/)）、每个页面是什么（[Article 结构化数据](https://geo.casa/zh-cn/content-structured-data/article-structured-data/)）。它是否影响 AI 引用仍是开放问题：[结构化数据会改变 AI 搜索引用吗？](https://geo.casa/zh-cn/playbooks/schema-ai-citations/)。

- 用富媒体搜索结果测试工具检查一个页面，数一数有几个插件在输出标记。
- 关掉主题或多余插件的重复输出。
- 在 SEO 插件设置里填好组织名称、Logo 和社交资料链接。

## 6. 正文放在 HTML 里

经典 WordPress 主题在服务端渲染，正文本来就在 HTML 里。但部分轮播、选项卡、「加载更多」模块和 Headless 前端会用 JavaScript 加载内容。

> **官方文档已说明:**
> Google 推荐服务端渲染或预渲染，原因是「并非所有机器人都能运行 JavaScript」。
>
> 参考来源: [Google Search Central: Understand JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)

用 `curl` 抓取页面，搜索文章中间的一句话。找不到的话，参见 [Next.js、Vue 等前端渲染站点：让 AI 爬虫读到正文](https://geo.casa/zh-cn/best-practices/javascript-sites/)。

模板还要再查两项：

> **官方文档已说明:**
> `nosnippet` 会阻止内容被直接用作 AI 概览和 AI 模式的输入，`max-snippet` 会限制可用的篇幅。
>
> 参考来源: [Google Search Central: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag)

有些 SEO 插件把它们做成单篇或全站的「高级 robots」选项。在页面源代码里搜索 `nosnippet`、`max-snippet` 和 `data-nosnippet`。详见 [AI 概览与 AI 模式的摘要控制](https://geo.casa/zh-cn/crawling-indexing/snippet-controls/)。

> 一个忘掉的设置，能抵消一整年的写作。模板查一次，每次插件更新后再查一次。

## 不要做的事

- **不要同时装多个 SEO 插件。** 它们会输出互相冲突的 Sitemap、规范网址和标记（见第 5 步）。
- **不要一键屏蔽所有「AI 机器人」。** 搜索爬虫和训练爬虫要分开决定；屏蔽 OAI-SearchBot 会让你从 ChatGPT 搜索中消失（见第 2 步）。
- **不要把 llms.txt 插件当成解决办法。** 没有证据表明它能提升 AI 搜索可见度：[说法核查：llms.txt 能提升 AI 搜索可见度](https://geo.casa/zh-cn/tools-protocols/llms-txt/)。
- **不要用 AI 插件批量生产文章。** 为操纵排名而大量生成内容属于垃圾政策问题：[规模化内容滥用（Scaled content abuse）](https://geo.casa/zh-cn/content-structured-data/scaled-content-abuse/)。
- **不要标记页面上没有的 FAQ、评价或评分**（见第 5 步）。

## 怎么判断有没有效果

> **官方文档已说明:**
> Google 的爬虫可以通过反向 DNS 查询再正向查询来验证，也可以对照 Google 公布的 IP 列表验证。
>
> 参考来源: [Google: Verify requests from Google crawlers and fetchers](https://developers.google.com/crawling/docs/crawlers-fetchers/verify-google-requests)

- **爬虫访问。** 在服务器或 CDN 日志中，统计 Googlebot、Bingbot、OAI-SearchBot、PerplexityBot 的已验证访问及状态码：[在服务器日志中验证 AI 爬虫流量](https://geo.casa/zh-cn/implementation/verify-ai-crawlers/)。
- **Google。** 使用 Search Console 的生成式 AI 效果报告：[Search Console 中的 AI 概览与 AI 模式数据](https://geo.casa/zh-cn/measurement/search-console-ai-features/)。
- **Bing 与 Copilot。** 使用 Bing 的 AI Performance 报告：[Bing AI 表现报告（AI Performance）](https://geo.casa/zh-cn/measurement/bing-ai-performance/)。
- **AI 回答。** 每月用固定的提示词集合测试并记录引用：[用提示词抽样测量 AI 可见度](https://geo.casa/zh-cn/measurement/ai-visibility-measurement/)。

> **官方文档已说明:**
> Bing 网站管理员工具提供 AI Performance 报告，显示网站在 Copilot 和 Bing AI 生成回答中被引用的情况。
>
> 参考来源: [Microsoft Bing: AI Performance report (Bing Webmaster Tools help)](https://www.bing.com/webmasters/help/ai-performance-9f8e7d6c)

> **官方文档已说明:**
> 生成式 AI 效果报告「显示您的网站在 Google 搜索生成式 AI 功能中的表现数据」。
>
> 参考来源: [Google Search Console Help: Generative AI performance report (Search) - Search Console Help](https://support.google.com/webmasters/answer/16984139)

## 证据一览

| 建议 | 证据等级 |
|---|---|
| 取消「建议搜索引擎不索引」 | 官方（WordPress、Google） |
| 在 robots.txt 放行 AI 搜索爬虫 | 官方（OpenAI） |
| 检查 CDN、主机和安全插件 | 官方（Google、Cloudflare） |
| 提交一份 Sitemap | 官方（WordPress） |
| 一个与页面一致的结构化数据来源 | 官方（Google、Yoast） |
| 结构化数据能提高 AI 引用 | 尚未证实 |
| 正文在服务端 HTML 中 | 官方（Google） |
| 用日志和 AI 报告衡量 | 官方（Google、Bing） |

## 参考来源

- [WordPress.org: Settings Reading screen](https://wordpress.org/documentation/article/settings-reading-screen/)
- [WordPress.org (Make WordPress Core): New XML Sitemaps Functionality in WordPress 5.5](https://make.wordpress.org/core/2020/07/22/new-xml-sitemaps-functionality-in-wordpress-5-5/)
- [Google Search Central: AI features and your website](https://developers.google.com/search/docs/appearance/ai-features)
- [OpenAI: Overview of OpenAI crawlers](https://developers.openai.com/api/docs/bots)
- [Google Search Central: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag)
- [Cloudflare: Block AI Bots](https://developers.cloudflare.com/bots/additional-configurations/block-ai-bots/)
- [Yoast: Structured data - Yoast SEO Features](https://yoast.com/features/structured-data/)
- [Google Search Central: General structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies)
- [Google Search Central: Understand JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)
- [Google: Verify requests from Google crawlers and fetchers](https://developers.google.com/crawling/docs/crawlers-fetchers/verify-google-requests)
- [Microsoft Bing: AI Performance report (Bing Webmaster Tools help)](https://www.bing.com/webmasters/help/ai-performance-9f8e7d6c)
- [Google Search Console Help: Generative AI performance report (Search) - Search Console Help](https://support.google.com/webmasters/answer/16984139)
