以下是一个示例的robots.txt文件,允许多个用户代理,并为每个用户代理设置不同的爬行延迟。Crawl-delay值仅用于说明目的,在实际的robots.txt文件中会有所不同。
我在网上搜索了很多答案,但没有找到合适的答案。有太多混合的建议,我不知道哪种是正确/合适的方法。
问题:
(1)每个用户代理都可以有自己的爬行延迟吗? (我认为是的)
(2)在Allow / Dissallow行之前还是之后放置每个用户代理的crawl-delay行?
(3)每个用户代理组之间是否必须有空白行?
参考资料:
提前致谢。
我在网上搜索了很多答案,但没有找到合适的答案。有太多混合的建议,我不知道哪种是正确/合适的方法。
问题:
(1)每个用户代理都可以有自己的爬行延迟吗? (我认为是的)
(2)在Allow / Dissallow行之前还是之后放置每个用户代理的crawl-delay行?
(3)每个用户代理组之间是否必须有空白行?
参考资料:
http://www.seopt.com/2013/01/robots-text-file/
http://help.yandex.com/webmaster/?id=1113851#1113858
基本上,我想找出使用下面示例中的值应该如何编写最终的robots.txt文件。提前致谢。
# Allow only major search spiders
User-agent: Mediapartners-Google
Disallow:
Crawl-delay: 11
User-agent: Googlebot
Disallow:
Crawl-delay: 12
User-agent: Adsbot-Google
Disallow:
Crawl-delay: 13
User-agent: Googlebot-Image
Disallow:
Crawl-delay: 14
User-agent: Googlebot-Mobile
Disallow:
Crawl-delay: 15
User-agent: MSNBot
Disallow:
Crawl-delay: 16
User-agent: bingbot
Disallow:
Crawl-delay: 17
User-agent: Slurp
Disallow:
Crawl-delay: 18
User-agent: Yahoo! Slurp
Disallow:
Crawl-delay: 19
# Block all other spiders
User-agent: *
Disallow: /
# Block Directories for all spiders
User-agent: *
Disallow: /ads/
Disallow: /cgi-bin/
Disallow: /scripts/
(4) 如果我想要将所有用户代理的爬行延迟设置为10秒,以下内容是否正确?
# Allow only major search spiders
User-agent: *
Crawl-delay: 10
User-agent: Mediapartners-Google
Disallow:
User-agent: Googlebot
Disallow:
User-agent: Adsbot-Google
Disallow:
User-agent: Googlebot-Image
Disallow:
User-agent: Googlebot-Mobile
Disallow:
User-agent: MSNBot
Disallow:
User-agent: bingbot
Disallow:
User-agent: Slurp
Disallow:
User-agent: Yahoo! Slurp
Disallow:
# Block all other spiders
User-agent: *
Disallow: /
# Block Directories for all spiders
User-agent: *
Disallow: /ads/
Disallow: /cgi-bin/
Disallow: /scripts/