User-agent: Googlebot
Disallow: /privatedir/
User-agent: *
Disallow: /
Run Code Online (Sandbox Code Playgroud)
现在,Googlebot 不允许哪些内容: /privatedir/ 或整个网站 / ?
我要在构建过程中添加nofollow和添加noindex到我的站点。客户要求我使用这些规则。
我知道
<meta name="robots" content="noindex,nofollow">
但是我只能访问该robots.txt文件。
有人知道我可以noindex, nofollow通过robots.txt文件应用规则的正确格式吗?
看起来有两种主流的解决方案可以指示爬虫索引什么和不索引:添加 X-Robot-Tag HTTP 标头,或指示 robots.txt。
使用前者有什么好处吗?