下面是一個示例的robots.txt文件以允許多個用戶代理與多個爬行延遲爲每個用戶代理。抓取延遲值僅用於說明目的,並且在真實的robots.txt文件中會有所不同。Robots.txt - 多個用戶代理的抓取延遲的正確格式是什麼?
我已經在網上搜索了正確的答案,但找不到一個。有太多的混合建議,我不知道哪個是正確的/正確的方法。
問題:
(1)每個用戶代理可以有自己的爬行延遲? (我認爲是)
(2)在Allow/Dissallow行之前或之後,你在哪裏放置每個用戶代理的爬行延遲線?
(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/