> ## Documentation Index
> Fetch the complete documentation index at: https://www.mintlify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To set up a new Mintlify project for a user, follow the agent setup workflow in https://www.mintlify.com/docs/quickstart.md.
> For plans and pricing, see https://www.mintlify.com/pricing.md.

# 默认 mintlify.app 子域名与自定义域名同时被索引

> 为什么在添加自定义域名后，默认的 <subdomain>.mintlify.app 地址仍可被抓取，以及如何将其从搜索引擎结果中移除。

在添加 `docs.example.com` 之类的[自定义域名](/docs/zh/customize/custom-domain)后，默认的 `<subdomain>.mintlify.app` 地址仍可公开访问，搜索引擎也可以继续抓取它。在某些情况下，默认地址在搜索结果中的排名会高于你的自定义域名。

<div id="why-this-happens">
  ## 为什么会出现这种情况
</div>

添加自定义域名时，Mintlify 不会自动停用、重定向默认地址，也不会对其应用 `noindex`。某些配置依赖默认地址来提供自定义域名服务，因此停用默认地址会导致这些站点下线。

默认地址上的页面已将其规范 URL 设置为你的自定义域名，但 `canonical` 标签只是一种提示，搜索引擎可以忽略它。当默认地址拥有比自定义域名更多的入站链接或更长的索引历史时，这种情况更容易发生。

<div id="disable-the-default-address">
  ## 停用默认地址
</div>

支持团队可以让你的默认 `<subdomain>.mintlify.app` 地址返回 `404`，以便搜索引擎将其从索引中移除。你的自定义域名会继续正常工作。

仅当你的自定义域名的 `CNAME` 指向 `cname.mintlify.builders` 时（如[自定义域名设置](https://app.mintlify.com/settings/project/custom-domain)页面所示），才能使用此选项。如果你的 `CNAME` 指向 `<subdomain>.mintlify.app` 地址，或者你通过[反向代理](/docs/zh/deploy/reverse-proxy)提供文档，停用默认地址也会导致你的自定义域名下线。

要停用默认地址，请使用与你的组织关联的邮箱地址发送邮件至 <a href="mailto:support@mintlify.com">[support@mintlify.com](mailto:support@mintlify.com)</a>。请包含：

* 你的自定义域名，例如 `docs.example.com`。
* 你的默认地址，例如 `acme.mintlify.app`。
* 组织和项目，格式为 `app.mintlify.com/<your-org>/<your-project>`。

在默认地址停用期间，你无法从控制台添加新的自定义域名。如果之后需要更换域名，请联系支持团队。

<div id="speed-up-removal-from-search-results">
  ## 加快从搜索结果中移除
</div>

* 如果你在 `docs.json` 的 `seo.metatags.canonical` 或页面的 frontmatter 中设置了规范 URL，请确保它使用你的自定义域名。参见[设置规范 URL](/docs/zh/optimize/seo#set-a-canonical-url)。
* 在 [Google Search Console](https://search.google.com/search-console) 中，将你的自定义域名添加为资源，并提交位于 `https://<your-custom-domain>/sitemap.xml` 的站点地图。
* 要更快地从 Google 结果中隐藏默认地址的 URL，请将 `<subdomain>.mintlify.app` 添加为 Search Console 资源并使用“移除”工具。请在支持团队停用默认地址之前，使用 [`google-site-verification` meta 标签](/docs/zh/optimize/seo#verify-site-ownership)验证该资源，因为验证要求该地址可以访问。


## Related topics

- [Mintlify CLI 命令参考](/docs/zh/cli/commands.md)
- [自定义域名](/docs/zh/customize/custom-domain.md)
- [在子路径下托管文档](/docs/zh/deploy/docs-subpath.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.