robots.txt是搜尋引擎擷取網站資料的參考,如果有任何不想被搜尋引擎知道的目錄、檔案…等,可以透過robots.txt禁止。
禁止搜尋引擎找log目錄、cgi-bin目錄
User-agent: * |
*表示全部的搜尋引擎,Disallow是不允許,不允許的東西是空的,表示整個網站都允許搜尋引擎擷取
User-agent: * |
Allow是允許的意思,表示整個網站都允許搜尋引擎擷取
User-agent: * |
禁止搜尋引擎擷取圖片
常用的搜尋引擎名稱:
Googlebot http://www.google.com –> Google
Baiduspider http://www.baidu.com –> 百度
MSN Live Search http://www.live.com/
Scooter http://www.altavista.com
ia_archiver http://www.alexa.com
FAST-WebCrawler http://www.alltheweb.com
Slurp http://www.inktomi.com
robots.txt專門說明的網站:
http://www.robotstxt.org/robotstxt.html
http://www.robotstxt.org/orig.html
Google有關於robots.txt的說明:https://support.google.com/webmasters/answer/156449?hl=zh-Hant&from=35237&rd=1
Wiki關於robots.txt的說明:http://en.wikipedia.org/wiki/Robots.txt
robots.txt的實際案例:
http://edition.cnn.com/robots.txt
http://www.google.com/robots.txt
robots.txt語法產生器:http://www.mcanerin.com/EN/search-engine/robots-txt.asp
其他網站的教學:
http://www.dami.tw/2012/11/14dami.html
http://www.how2use.net/phpbb/viewtopic.php?t=1149
http://seo.soft4fun.net/2009/06/seo%E8%A7%80%E5%BF%B5-robots-txt/