在标签页添加“noindex”

大家好,

我决定在 Discourse 上使用标签。但我不希望标签页面被 Google 索引…

所以我想知道如何在标签页面上添加“noindex”Robots meta 标签。

<meta name="robots" content="noindex" />

谢谢!

标签页和用户页的情况也和我一样。

标签页和用户页已在 noindex 列表中。

1 个赞

嗯,我们的 Tag 页面和 User 页面似乎都没有 noindex 标签。不是我搭建的论坛,所以我不确定之前的人是否对此做过调整。在哪里可以修改这个设置?

noindex 指令通过响应头和 robots.txt 文件同时提供:

➜  ~ curl https://meta.discourse.org/tag/planned -I -X GET
HTTP/2 200 
date: Tue, 09 Feb 2021 14:38:52 GMT
...
x-robots-tag: noindex
...
➜  ~ curl https://meta.discourse.org/u/Falco -I -X GET
HTTP/2 200 
date: Tue, 09 Feb 2021 14:39:38 GMT
...
x-robots-tag: noindex
...

https://meta.discourse.org/robots.txt

User-agent: *
...
Disallow: /u
Disallow: /my
Disallow: /tag
...
4 个赞