AI 爬蟲怎麼設定?robots.txt 允許與封鎖指南(GPTBot、ClaudeBot、PerplexityBot)
AI 爬蟲依用途分三種:訓練(收集資料訓練模型)、搜尋(建立 AI 搜尋的索引)、使用者觸發(使用者在對話中要求 AI 開啟某個網頁)。想讓品牌出現在 AI 回答中,最重要的是不要擋掉「搜尋」類的爬蟲;要不要讓內容被拿去訓練,則可以分開決定。
各家 AI 爬蟲一覽
| 公司 | 名稱 | 用途 | 擋掉的影響 |
|---|---|---|---|
| OpenAI | OAI-SearchBot | ChatGPT 搜尋 | 不會出現在 ChatGPT 的搜尋答案中 |
| OpenAI | GPTBot | 模型訓練 | 內容不用於訓練基礎模型 |
| OpenAI | ChatGPT-User | 使用者觸發 | 不是自動爬網,也不用來決定搜尋收錄 |
| Anthropic | Claude-SearchBot | Claude 搜尋 | 內容不會被索引,可能降低在 Claude 搜尋中的能見度 |
| Anthropic | ClaudeBot | 模型訓練 | 之後的內容排除在訓練資料外 |
| Anthropic | Claude-User | 使用者觸發 | 可能降低使用者要求搜尋時的能見度 |
| Perplexity | PerplexityBot | Perplexity 搜尋(不用於訓練基礎模型) | 網站可能無法在 Perplexity 搜尋結果中被顯示與連結 |
| Perplexity | Perplexity-User | 使用者觸發 | 官方表示這類抓取通常不遵守 robots.txt |
| Google-Extended | Gemini 應用與 Vertex AI 的訓練與 grounding | 不影響 Google 搜尋,也不是排名訊號 |
資料來源:OpenAI、Anthropic、Perplexity、Google。各家會更新爬蟲清單,設定前請以官方文件為準。
Google AI 摘要要怎麼控制?
Google 的 AI 摘要與 AI 模式沒有獨立的爬蟲,使用的就是一般搜尋的 Googlebot。Google 官方說明,出現在 AI 摘要沒有額外的要求,頁面已被索引、可以顯示摘要即可(來源)。
- Google-Extended 不影響 AI 摘要:它只控制內容是否用於 Gemini 應用與 Vertex AI 的訓練和 grounding。
- 想限制頁面在搜尋中顯示的內容:Google 提供 nosnippet、data-nosnippet、max-snippet、noindex 等控制方式,但這些也會影響一般搜尋結果的摘要。
- 擋掉 Googlebot:整個網站會從 Google 搜尋消失,AI 摘要也一樣。
想出現在 AI 回答中,建議這樣設定
| 類型 | 建議 | 原因 |
|---|---|---|
| 搜尋爬蟲(OAI-SearchBot、Claude-SearchBot、PerplexityBot、Googlebot、Bingbot) | 允許 | AI 搜尋要先抓得到你的頁面,才可能引用你 |
| 訓練爬蟲(GPTBot、ClaudeBot) | 依公司政策決定 | 不影響上述 AI 搜尋的收錄,但會影響模型本身對你的認識 |
| Google-Extended | 想出現在 Gemini 回答中,建議允許 | 它除了訓練,也控制 Gemini 應用使用你的內容做 grounding(依據網路內容回答) |
| 使用者觸發(ChatGPT-User、Claude-User、Perplexity-User) | 一般不需要特別設定 | 代替使用者開啟網頁,擋掉可能讓使用者貼你的網址時讀不到內容 |
robots.txt 範例
全部允許(多數想被 AI 推薦的品牌適用):
User-agent: *
Allow: /
Disallow: /admin/
Sitemap: https://www.example.com/sitemap.xml
允許 AI 搜尋,但不讓內容用於模型訓練:
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: *
Allow: /
Disallow: /admin/
Sitemap: https://www.example.com/sitemap.xml
這個範例沒有擋 Google-Extended。擋掉它,內容也不會被 Gemini 應用拿來做 grounding,可能降低在 Gemini 回答中被引用的機會。
robots.txt 是「請勿抓取」的訊號,不是存取控制。不想公開的內容要用登入或其他權限機制保護,不要只靠 robots.txt。
設定完還要檢查什麼?
- 內容是不是文字:很多官網是前端渲染,不執行 JavaScript 的爬蟲只看到空白頁。用瀏覽器「檢視原始碼」確認重要內容有出現在 HTML 裡。
- 防火牆與 CDN:有些網站的 bot 防護會直接擋掉 AI 爬蟲,robots.txt 允許也沒用。
- 生效時間:Perplexity 表示,系統可能需要最多 24 小時才會反映 robots.txt 的變更。
- sitemap:提交到 Google Search Console 與 Bing Webmaster Tools。
常見問題
擋掉 GPTBot,ChatGPT 就不會推薦我嗎?
不一定。OpenAI 把用途分開:GPTBot 和模型訓練有關,ChatGPT 搜尋是由 OAI-SearchBot 抓取。只擋 GPTBot、不擋 OAI-SearchBot,網站仍可能出現在 ChatGPT 的搜尋答案中。
擋掉 Google-Extended 會影響 Google 排名嗎?
不會。Google 官方說明,Google-Extended 不影響網站是否出現在 Google 搜尋,也不是排名訊號。
需要 llms.txt 嗎?
Google 官方說明表示,出現在 AI 摘要與 AI 模式不需要 AI 專用的檔案。llms.txt 可以當作補充,但先把 robots.txt、sitemap、可讀的 HTML 做好更重要。
怎麼知道 AI 爬蟲有沒有來過?
查網站伺服器或 CDN 的存取紀錄,搜尋上面表格中的名稱。部分業者也公布了爬蟲的 IP 範圍,可以用來確認是不是冒名的爬蟲。
參考資料
- OpenAI,〈Overview of OpenAI Crawlers〉
- Anthropic,〈Does Anthropic crawl data from the web, and how can site owners block the crawler?〉
- Perplexity,〈Perplexity Crawlers〉
- Google Search Central,〈Google's common crawlers〉
- Google Search Central,〈AI features and your website〉