# 通过 DNS TXT 记录在 Cloudflare 中使用 Google Search Console

**URL:** https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099
**Category:** Self-hosting
**Created:** [2021年五月30日 16:29 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099 "2021-05-30T16:29:26Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DiscourseUser](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@DiscourseUser](https://meta.discourse.org/u/DiscourseUser)
#### Post date: [2021年五月30日 16:29 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099/1 "2021-05-30T16:29:26Z")

</div>

你好，我正在使用 Cloudflare，但当我进入 Google Search Console 时，它提示我添加一条 TXT 记录。有人能指导一下在使用 Cloudflare 的情况下，如何让我的 Discourse 论坛被 Google 收录吗？非常感谢。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2021年五月30日 18:16 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099/2 "2021-05-30T18:16:51Z")

</div>

如果 Cloudflare 阻止了 Google 访问您的论坛，您应该在 Cloudflare 论坛上询问如何解决该问题。您可以在这里找到数十个关于人们遇到 Cloudflare 问题的主题。最简单的解决方案是将其设置为仅 DNS。

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2021年五月30日 18:48 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099/3 "2021-05-30T18:48:11Z")

</div>

我不确定上文是否意味着阻止，这听起来更像是 GSC 中提示添加 TXT 记录以授权域名的操作。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2021年五月30日 22:30 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099/4 "2021-05-30T22:30:29Z")

</div>

哦！是的，他正是这个意思。我刚才理解错了。🤷‍♂️

---

<div class="post-metadata">

### Author: ![DiscourseUser](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@DiscourseUser](https://meta.discourse.org/u/DiscourseUser)
#### Post date: [2021年五月30日 22:51 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099/5 "2021-05-30T22:51:14Z")

</div>

是的，我使用 Cloudflare 的 DNS 设置来获取 HTTPS。

但我希望我的网站能被收录，而 Google 搜索控制台提示我需要在 DNS 设置中添加一条 TXT 记录。

不过，我不知道“名称”字段和"TTL"该填什么。

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/4/04ba7f8ab837631e7f678d93950639658dd7408c.png)

---

<div class="post-metadata">

### Author: ![DaVania](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@DaVania](https://meta.discourse.org/u/DaVania)
#### Post date: [2021年五月30日 23:17 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099/6 "2021-05-30T23:17:44Z")

</div>

请查看这两个页面，看看是否能找到足够的信息：

第一个页面是关于 Google Workspace 的，但 Cloudflare 中的流程应该相同。

第二个页面是关于 Google Search 的，这正是您需要的，但截图和指南的质量较低。

> **[Verify your domain with a TXT record  |  Domain management  |  Google...](https://knowledge.workspace.google.com/admin/domains/verify-your-domain-with-a-txt-record?visit_id=639105443752416297-4109110005&rd=2)**

> **[Verifying A Google Search Console Domain Property With Cloudflare - Bertey](https://bertey.com/verifying-a-google-search-console-domain-property-with-cloudflare/)**
>
> Steps on how to verify the new domain property in Google Search Console using DNS verification and Cloudflare verification via DNS TXT record

---

<div class="post-metadata">

### Author: ![DiscourseUser](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@DiscourseUser](https://meta.discourse.org/u/DiscourseUser)
#### Post date: [2021年五月30日 23:25 UTC](https://meta.discourse.org/t/using-google-search-console-with-cloudflare-via-dns-txt-records/192099/7 "2021-05-30T23:25:29Z")

</div>

谢谢！成功了！
