prev1-2 robots.txt

1-3 robots 內碼設定

robots.txt 是用來告訴搜尋引擎哪些地方不可以拿去做全文檢索資料庫。

robots.txt 樣本:

User-agent: {Spider名}
Disallow: {File位置}

設定方式很簡單:

  1. 使用 Notepad 來設定 robots.txt
  2. 上傳在網頁的root位置。


robots.txt範例如下:

  1. 設定所有 robot 不能夠收集 /upload/ 和 /download/ 目錄中的資料:
    User-agent: *
    Disallow: /upload/
    Disallow: /download/
  2. 設定所有 robot 不能夠收集 index.htm 和 /work/index.html 中的資料:
    User-agent: *
    Disallow: /index.htm
    Disallow: /work/index.html
  3. 設定所有 robot 不能夠收集所有網頁資料:
    User-agent: *
    Disallow: /
  4. 設定 Google Robot 不能夠收集 /upload/ 目錄中的資料:
    User-agent: Googlebot
    Disallow: /upload/
  5. 設定 Google Robot 和 Excite Spider 不能夠收集 /tmp/ 和 /index/work.html 目錄中的資料User-agent: Googlebot
    User-agent: ArchitextSpider
    Disallow: /tmp/
    Disallow: /index/work.html


Robot對照表:


搜尋引擎 Robot 名稱
AltaVista Scooter
Infoseek Infoseek
Hotbot Slurp
AOL Search Slurp
Excite ArchitextSpider
Google Googlebot
Goto Slurp
Lycos Lycos
MSN Slurp
Netscape Googlebot
NorthernLight Gulliver
WebCrawler ArchitextSpider
Iwon Slurp
Fast Fast
DirectHit Grabber
Yahoo Web Pages Yahoo Slurp
Looksmart Web Pages Slurp
prev1-2 robots.txt

網友個人意見,不代表本站立場。對於發言內容,由發表者自負責任。
發表者 樹狀展開


首 頁 以瑪消息 以瑪作品集 以瑪服務 以瑪線上報價 以瑪資訊分享 關於以瑪網頁 以瑪即時留言

Designed by EMA © 2009 以瑪網頁行銷公司 / Tel:06-3122606 / email:ema@ema.idv.tw / 統一編號:25045686 / 本網站請以 IE 7.0 或以上版本瀏覽