我想在构建网站时将nofollow
和noindex
添加到我的网站。客户有要求我使用这些规则。
我知道
<meta name="robots" content="noindex,nofollow">
但是我只能访问robots.txt
文件。有人知道我可以通过
noindex, nofollow
文件应用robots.txt
规则的正确格式吗?
最佳答案
noindex和nofollow表示您不希望您的网站在搜索引擎中爬网。
所以只需将代码放在robots.txt中
User-agent: *
Disallow: /
这意味着noindex和nofollow。
关于http - 如何在robots.txt中添加 `nofollow, noindex`所有页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45790024/