我要在构建过程中添加nofollow和添加noindex到我的站点。客户要求我使用这些规则。
我知道
<meta name="robots" content="noindex,nofollow">
但是我只能访问该robots.txt文件。
有人知道我可以noindex, nofollow通过robots.txt文件应用规则的正确格式吗?
有一个非标准Noindex字段,谷歌(可能没有其他消费者)支持该字段作为实验功能。
遵循 robots.txt 规范,您可以\xe2\x80\x99t 禁止索引或跟踪包含 robots.txt 的链接。
\n\n对于仍在开发中、尚未编入索引且\xe2\x80\x99 无法从可能被抓取的页面获取反向链接的网站,使用 robots.txt 就足够了:
\n\n# no bot may crawl \nUser-agent: *\nDisallow: /\nRun Code Online (Sandbox Code Playgroud)\n\n如果站点中的页面已被索引,和/或可能被爬网的其他页面链接到该站点,则必须使用noindex,它不仅可以在 HTML 中指定,还可以作为 HTTP header指定:
X-Robots-Tag: noindex, nofollow\nRun Code Online (Sandbox Code Playgroud)\n
小智 5
noindex和nofollow表示您不希望您的网站在搜索引擎中爬网。
因此只需将代码放入robots.txt
User-agent: *
Disallow: /
这意味着noindex和nofollow。
| 归档时间: |
|
| 查看次数: |
7018 次 |
| 最近记录: |