> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/fa-bu/seo.md).

# SEO

GitBook 会自动处理大部分 SEO。已发布站点具有响应式设计、预渲染，并通过全球 CDN 提供服务，你几乎无需额外配置。

### GitBook 自动执行的操作

#### 响应式设计

已发布内容可适应任何屏幕尺寸——手机、平板和桌面设备。

#### URL 和元数据

* 默认情况下，页面 URL 基于页面标题，但可自定义。
* 规范 URL 可防止重复内容问题。
* HTML 和 Open Graph 标题取自页面标题和站点标题。
* Meta 和 Open Graph 描述取自页面描述。
* 图片支持替代文本，这有助于搜索引擎和无障碍访问。
* HTML 在服务器端预渲染，因此爬虫无需 JavaScript 即可索引你的内容。

{% hint style="info" %}
GitBook 不会生成关键词 meta 标签。现代搜索引擎不使用它们进行排名—— [谷歌在 2009 年证实了这一点](https://developers.google.com/search/blog/2009/09/google-does-not-use-keywords-meta-tag).
{% endhint %}

#### 站点地图

GitBook 会为任何未设置为不列出的已发布站点自动生成站点地图。要找到它，请在 `/sitemap-pages.xml` 你的网站主页 URL 后附加——例如， [gitbook.com/docs/sitemap-pages.xml](https://gitbook.com/docs/sitemap-pages.xml).

#### CDN 和缓存

所有已发布内容都会缓存并通过全球 CDN 提供。更快的加载时间可同时改善用户体验和搜索排名。

### 你可以做什么

#### 设置自定义域名

像 `docs.example.com` 这样的自定义域名，相比 `yourorganization.gitbook.io` 子域名，可提升搜索可见性。设置自定义域名 →

#### 提高索引速度

GitBook 无法控制搜索引擎索引你内容的速度，但有两件事可以帮助：

1. 从已被索引的页面链接到你的网站。当谷歌重新抓取这些页面时，就更有可能发现你的网站。
2. 直接向谷歌提交你的网站。这需要自定义域名，并通过 TXT DNS 记录进行所有权验证。 [将你的网站提交给谷歌 →](https://developers.google.com/search/docs/advanced/crawling/ask-google-to-recrawl)

#### 设置重定向

将内容迁移到 GitBook 或重组你的网站可能会破坏现有链接并影响 SEO。设置 [redirects](/docs/documentation/zh/fa-bu/site-redirects.md) → 以将旧 URL 转发到新 URL。

当你移动或重命名页面时，GitBook 会自动创建一个 [HTTP 307 重定向](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/307) ，将旧 URL 重定向到新 URL。 [了解更多关于自动重定向的信息 →](/docs/documentation/zh/fa-bu/site-redirects.md#about-automatic-redirects)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/fa-bu/seo.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
