Robots協議(也稱為爬蟲協議、機器人協議等)的全稱是“網絡爬蟲排除標準”(Robots Exclusion Protocol),網站通過Robots協議告訴搜索引擎哪些頁面可以抓取,哪些頁面不能抓取。(百度百科)
- 文件寫法
- User-agent: * 這里的 * 代表的所有的搜索引擎種類, * 是一個通配符
- Disallow: /ABC/ 這里定義是禁止爬尋ABC目錄下面的目錄
- Disallow:/ab/adc.html 禁止爬取ab文件夾下面的adc.html文件。
- Allow: /cgi-bin/ 這里定義是允許爬尋cgi-bin目錄下面的目錄
- Allow: /tmp 這里定義是允許爬尋tmp的整個目錄
- Sitemap: 網站地圖 告訴爬蟲這個頁面是網站地圖
購物網站
亞馬遜中國
https://www.amazon.cn/robots.txt
- User-agent: *
- Disallow: /buycar
- Disallow: /cart
- Disallow: /checkout
- Disallow: /class
- Disallow: /com
- Disallow: /common
- Disallow: /css
- Disallow: /dll
- Disallow: /doc
- Disallow: /dp/e-mail-friend/
- Disallow: /dp/manual-submit/
- Disallow: /dp/product-availability/
- Disallow: /dp/rate-this-item/
- Disallow: /dp/shipping/
- Disallow: /dp/twister-update/
- Disallow: /gp/aws/ssop
- Disallow: /gp/cart
- Disallow: /gp/css/homepage.html
- Disallow: /gp/customer-reviews/common/du
- Disallow: /gp/flex
- Disallow: /gp/gfix
- Disallow: /gp/history
- Disallow: /gp/item-dispatch
- Disallow: /gp/music/clipserve
- Disallow: /gp/music/wma-pop-up
- Disallow: /gp/offer-listing
- Disallow: /gp/product/e-mail-friend
- Disallow: /gp/product/product-availability
- Disallow: /gp/product/rate-this-item
- Disallow: /gp/recsradio
- Disallow: /gp/slredirect
- Disallow: /gp/twitter/
- Disallow: /gp/vote
- Disallow: /gp/voting/
- Disallow: /gp/yourstore
- Disallow: /inc
- Disallow: /js
- Disallow: /lib
- Disallow: /mn/bookLookInsideApp
- Disallow: /mn/checkInitApp
- Disallow: /mn/checkoutAlertMsgApp
- Disallow: /mn/checkoutredirectApp
- Disallow: /mn/giftCardApp
- Disallow: /mn/loginApplication
- Disallow: /mn/loyaltyApp
- Disallow: /mn/orderAddrApp
- Disallow: /mn/orderCfmApp
- Disallow: /mn/orderDetailApp
- Disallow: /mn/orderFailApp
- Disallow: /mn/orderHistoryApp
- Disallow: /mn/orderModifyApp
- Disallow: /mn/orderSummaryApp
- Disallow: /mn/paymentRedriveApp
- Disallow: /mn/recommendReviewApp
- Disallow: /mn/releaseReviewApp
- Disallow: /mn/reviewVoteApplication
- Disallow: /mn/selectPaymentMethodApp
- Disallow: /mn/selectShippingOpptionApplication
- Disallow: /mn/shipmentTraceApp
- Disallow: /mn/shoppingCartApplication
- Disallow: /mn/tellFriend
- Disallow: /mn/thankYouApplication
- Disallow: /mn/virtualAccountApp
- Disallow: /mn/yourAccountApp
- Disallow: /paper
- Disallow: /xml
- Disallow: /youraccount
- Disallow: /ap/signin
- Disallow: /gp/registry/wishlist/
- Disallow: /wishlist/
- Allow: /wishlist/universal*
- Allow: /wishlist/vendor-button*
- Allow: /wishlist/get-button*
- Disallow: /gp/wishlist/
- Allow: /gp/wishlist/universal*
- Allow: /gp/wishlist/vendor-button*
- Allow: /gp/wishlist/ipad-install*
- Disallow: /registry/wishlist/
- Disallow: /gp/help/contact-us/general-questions.html*?type&email&skip=true
- Disallow: /gp/help/customer/accessibility?ie=UTF8&initialIssue=forgotpw&skip=true
- Disallow: /gp/registry/search.html
- Disallow: /gp/orc/rml/
- Disallow: /gp/digital/fiona/manage
- Disallow: /gp/entity-alert/external
- Disallow: /gp/customer-reviews/dynamic/sims-box
- Disallow: /review/dynamic/sims-box
- Disallow: /gp/redirect.html
- Disallow: /gp/customer-media/upload/
- Disallow: /gp/customer-media/actions/delete/
- Disallow: /gp/customer-media/actions/edit-caption/
- Disallow: /gp/dmusic/
- Disallow: /registry
- Disallow: /*/wishlist
- Disallow: /gp/registry
- Disallow: /gp/aag
- Disallow: /gp/socialmedia/giveaways
- Disallow: /gp/aw/so.html
- Disallow: /gp/pdp/profile/
- Disallow: /gp/help/customer/display.html*nodeId=200843370
- Disallow: /gp/help/customer/display.html*nodeId=200877580
- Disallow: /gp/help/customer/display.html*nodeId=200877590
- Disallow: /gp/help/customer/display.html*nodeId=200879080
- Disallow: /gp/help/customer/display.html*nodeId=200879100
- Disallow: /gp/help/customer/display.html*nodeId=200879120
- Disallow: /gp/help/customer/display.html*nodeId=200879160
- Disallow: /gp/help/customer/display.html*nodeId=200879140
- Disallow: /gp/help/customer/display.html*nodeId=200877610
- Disallow: /gp/help/customer/display.html*nodeId=200878960
- Disallow: /gp/help/customer/display.html*nodeId=200878980
- Disallow: /gp/help/customer/display.html*nodeId=200879000
- Disallow: /gp/help/customer/display.html*nodeId=200879040
- Disallow: /gp/help/customer/display.html*nodeId=200879020
- Disallow: /gp/help/customer/display.html*nodeId=200877630
- Disallow: /gp/help/customer/display.html*nodeId=200879200
- Disallow: /gp/help/customer/display.html*nodeId=200879220
- Disallow: /gp/help/customer/display.html*nodeId=200879240
- Disallow: /gp/help/customer/display.html*nodeId=200879280
- Disallow: /gp/help/customer/display.html*nodeId=200879260
- Disallow: /gp/help/customer/display.html*nodeId=200877650
- Disallow: /gp/help/customer/display.html*nodeId=200879320
- Disallow: /gp/help/customer/display.html*nodeId=200879340
- Disallow: /gp/help/customer/display.html*nodeId=200879360
- Disallow: /gp/help/customer/display.html*nodeId=200879400
- Disallow: /gp/help/customer/display.html*nodeId=200879380
- Disallow: /gp/help/customer/display.html*nodeId=200877560
- Disallow: /gp/help/customer/display.html*nodeId=200843460
- Disallow: /gp/help/customer/display.html*nodeId=200843440
- Disallow: /gp/help/customer/display.html*nodeId=200899270
- Disallow: /gp/help/customer/display.html*nodeId=200879440
- Disallow: /gp/help/customer/display.html*nodeId=200899330
- Disallow: /gp/help/customer/display.html*nodeId=200899350
- Disallow: /gp/help/customer/display.html*nodeId=200899390
- Disallow: /gp/help/customer/display.html*nodeId=200899410
- Disallow: /gp/help/customer/display.html*nodeId=200899430
- Disallow: /gp/help/customer/display.html*nodeId=200899220
- Disallow: /gp/help/customer/display.html*nodeId=200899450
- Disallow: /gp/help/customer/display.html*nodeId=200899670
- Disallow: /gp/help/customer/display.html*nodeId=200899530
- Disallow: /gp/help/customer/display.html*nodeId=200899470
- Disallow: /gp/help/customer/display.html*nodeId=200899550
- Disallow: /gp/help/customer/display.html*nodeId=200899570
- Disallow: /gp/help/customer/display.html*nodeId=200899510
- Disallow: /gp/help/customer/display.html*nodeId=200899610
- Disallow: /gp/help/customer/display.html*nodeId=200899630
- Disallow: /gp/help/customer/display.html*nodeId=200899650
- Disallow: /gp/help/customer/display.html*nodeId=200879180
- Disallow: /gp/help/customer/display.html*nodeId=200879060
- Disallow: /gp/help/customer/display.html*nodeId=200879300
- Disallow: /gp/help/customer/display.html*nodeId=200879420
- Disallow: /gp/help/customer/display.html*nodeId=200899290
- Disallow: /gp/help/customer/display.html*nodeId=200899310
- Disallow: /gp/help/customer/display.html*nodeId=200843380
- Disallow: /gp/help/customer/display.html*nodeId=200843420
- Disallow: /gp/help/customer/display.html*nodeId=200899230
- Disallow: /gp/help/customer/display.html*nodeId=200899250
- Disallow: /gp/help/customer/display.html*nodeId=200899370
- Disallow: /reviews/iframe
- Disallow: /gp/help/reports/infringement/jquery/handle-notice-submit.html
- Disallow: /gp/help/customer/handler/handle-email-submit.html
不可爬取的頁面中可顯示的頁面包括:購物車,登錄,分類列表,個人賬戶頁面,購物歷史記錄,官方信息,首頁,心愿單,聯系客服,聯系我們,我的電子書,幫助。
亞馬遜主要禁止抓取的內容是一些商業信息以及用戶的個人信息,如今信息泄露現象越發普遍,作為一個線上購物平臺保護用戶的隱私顯得尤為重要,這不僅是對用戶個人財產安全的保護,也是對用戶本身安全的保護。不過,同時,亞馬遜也存在一些允許爬取的內容。
淘寶
https://www.taobao.com/robots.txt
User-agent: Baiduspider
Allow: /article
Allow: /oshtml
Allow: /wenzhang
Disallow: /product/
Disallow: /
User-Agent: Googlebot
Allow: /article
Allow: /oshtml
Allow: /product
Allow: /spu
Allow: /dianpu
Allow: /wenzhang
Allow: /oversea
Disallow: /
User-agent: Bingbot
Allow: /article
Allow: /oshtml
Allow: /product
Allow: /spu
Allow: /dianpu
Allow: /wenzhang
Allow: /oversea
Disallow: /
User-Agent: 360Spider
Allow: /article
Allow: /oshtml
Allow: /wenzhang
Disallow: /
User-Agent: Yisouspider
Allow: /article
Allow: /oshtml
Allow: /wenzhang
Disallow: /
User-Agent: Sogouspider
Allow: /article
Allow: /oshtml
Allow: /product
Allow: /wenzhang
Disallow: /
User-Agent: Yahoo! Slurp
Allow: /product
Allow: /spu
Allow: /dianpu
Allow: /wenzhang
Allow: /oversea
Disallow: /
User-Agent: *
Disallow: /
Baiduspider:百度蜘蛛,是百度搜索引擎的一個自動程序。它的作用是訪問收集整理互聯網上的網頁、圖片、視頻等內容,然后分門別類建立索引數據庫, 使用戶能在百度搜索引擎中搜索到您網站的網頁、圖片、視頻等內容。(百度百科)
Googlebot:谷歌的網頁抓取機器人(百度百科)
Bingbot是必應搜索引擎的爬蟲名稱,會在各個網站抓取內容時候留下腳印。(百度貼吧)
現在,如果在百度里搜索淘寶網,會看到的結果是“由于該網站的robots.txt文件存在限制指令,系統無法提供該頁面的內容描述”。事實上,百度和淘寶都試圖將中國網民培育出一種最符合自己利益用戶的習慣:就是盡量讓用戶用自己的搜索引擎完成消費選擇,如果自己能夠控制用戶端口,那么針對排名就可以做出多種付費推廣,而淘寶如果對百度蜘蛛開放robots.txt,作為中國最大的搜索引擎,百度很可能會針對淘寶開發出相應的開放平臺,蠶食淘寶的付費市場。如果強勢品牌能夠打造獨立商城分流淘寶店鋪的流量,一是可以避免身家性命全押在淘寶上需要通過競價系統購買昂貴的首頁廣告(百度同理),二是可以加強品牌優勢,培養用戶主動搜索品牌的消費習慣。
網頁小游戲
4399
http://www.4399.com/robots.txt
- User-agent: *
- Disallow: /upload_pic/
- Disallow: /upload_swf/
- Disallow: /360/
- Disallow: /public/
- Disallow: /yxbox/
- Disallow: /360game/
- Disallow: /loadimg/
- Disallow: /index_pc.htm
- Disallow: /flash/32979_pc.htm
- Disallow: /flash/35538_pc.htm
- Disallow: /flash/48399_pc.htm
- Disallow: /flash/seer_pc.htm
- Disallow: /flash/58739_pc.htm
- Disallow: /flash/78072_pc.htm
- Disallow: /flash/130396_pc.htm
- Disallow: /flash/80727_pc.htm
- Disallow: /flash/151038_pc.htm
- Disallow: /flash/10379_pc.htm
- Disallow: /index_old.htm
不可爬取的頁面中可顯示的頁面包括:游戲列表,最新好玩小游戲列表,首頁,洛克王國,奧拉星,賽爾號,龍戰士,造夢西游3之大鬧天庭篇,爆槍英雄,勇士的信仰(正式版),造夢西游4洪荒大劫篇,奧比島,老版首頁。
7k7k
http://www.7k7k.com/robots.txt
- User-agent: *
- Disallow: /doyo/
- Disallow: /doyoweb/
- Disallow: /yy/
- Disallow: /data/
- Disallow: /widget/
- Disallow: /api/
- Disallow: /classic
- Disallow: /classic/
- Disallow: /classic/tag/
- Disallow: /classic/swf/
- Disallow: /classic/flash_fl/
- Disallow: /classic/top/
- Disallow: /classic/flash/
- Disallow: /classic/index.htm
- Disallow: /new/
- Disallow: /m-iphone/art/
- Disallow: /m-ipad/art/
- Disallow: /m-android/art/
不可爬取的頁面中可顯示的頁面包括:每日最新Flash游戲列表,游戲分類列表,游戲列表,游戲分類標簽列表,游戲排行榜,首頁。
2144
- User-agent:Mediapartners-Google
- Disallow:
- User-agent: *
- Allow: /girls/?
- Disallow: /tuan
- Disallow: /v3
- Disallow: /hz/cntv
- Disallow: /testdsadsa21321
- Disallow: /xxx
- Disallow: /api
- Disallow: /game.htm
- Disallow: /index_test.htm
- Disallow: /webgame.htm
- Disallow: /index1.htm
- Disallow: /index_old.htm
- Disallow: /index_2010.htm
- Disallow: /index_2011.htm
- Disallow: /index_2012.htm
- Disallow: /game_test.php
- Disallow: /listgame.php
- Disallow: /cj.php
- Disallow: /sdogame.php
- Disallow: /archiver
- Disallow: /YouXi
- Disallow: /sdo
- Disallow: /Archives
- Disallow: /public
- Disallow: /html/26/51653/
- Disallow: /html/14/51654/
- Disallow: /html/14/51655/
- Disallow: /html/26/51857/
- Disallow: /html/14/51863/
- Disallow: /html/14/51862/
- Disallow: /html/14/51861/
- Disallow: /html/26/51858/
- Disallow: /html/26/51859/
- Disallow: /2345/
- Disallow: /2144com/
- Disallow: /xyx/
- Disallow: /xiaoyouxi/
- Disallow: /2015/
- Disallow: /2016/
不可爬取的頁面中可顯示的頁面包括:女生游戲列表,首頁,老版首頁,三國戰紀,戰神盟,三國志,三國戰,游戲列表。
大部分網頁小游戲網站都禁止爬取首頁,游戲列表,游戲分類列表以及部分小游戲網頁。
小結
購物網站大都將注意力放在用戶信息保護以及網站流量上面,網頁小游戲網站在關注網站流量的同時,也會著重保護團隊的創作成果。
Robots協議是網站出于安全和隱私考慮,防止搜索引擎抓取敏感信息而設置的。Robots協議代表了一種契約精神,互聯網企業只有遵守這一規則,才能保證網站及用戶的隱私數據不被侵犯。Robots協議是維護互聯網世界隱私安全的重要規則,是一種目前為止最有效的方式,用自律維持著網站與搜索引擎之間的平衡,讓兩者之間的利益不至于過度傾斜。