2024 年 12 月 3 日,星期二
您可能知道 Google 搜尋需要一些前製作業,才能讓網頁顯示在 Google 搜尋結果中。其中一個步驟就是「檢索」。Googlebot 負責處理 Google 搜尋的檢索作業,這個程式在 Google 伺服器上運作,會擷取網址、處理網路錯誤、重新導向和其他可能在檢索過程中遇到的網路問題。其中還有許多細節,但通常都不會提到。在這個月,我們每週都會探討其中一些細節,因為這些細節可能會對網站檢索方式產生重大影響。
快速回顧:什麼是檢索?
檢索是指發現新網頁、重新造訪更新的網頁,並下載這些網頁的程序。簡而言之,Googlebot 會取得網址,向代管該網址的伺服器傳送 HTTP 要求,然後處理該伺服器的回應,可能會重新導向、處理錯誤,並將網頁內容傳遞至 Google 索引系統。
不過,現代網頁並非只有純 HTML,如果網頁包含其他資源怎麼辦?檢索這些資源會對「檢索預算」造成什麼影響?這些資源能否在 Google 端快取?尚未檢索的網址與已建立索引的網址之間有差異嗎?本文將回答這些問題,並提供更多相關資訊!
Googlebot 和檢索網頁資源
除了 HTML 之外,現代網站還會結合使用 JavaScript 和 CSS 等不同技術,為使用者提供優異體驗和實用功能。透過瀏覽器存取這類網頁時,瀏覽器會先下載父層網址,這個網址會代管開始為使用者建構網頁所需的資料,也就是網頁的 HTML。這類初始資料可能包含 JavaScript 和 CSS 等資源的參照網址,也包含瀏覽器會再次下載的圖片和影片,最後建構出最終網頁並呈現給使用者。
Google 也會執行相同程序,但做法略有不同:
- Googlebot 從父層網址 (網頁的 HTML) 下載初始資料。
- Googlebot 將擷取的資料傳送至網路轉譯服務 (WRS)。
- WRS 透過 Googlebot 下載原始資料中參照的資源。
- WRS 採用與使用者瀏覽器一樣的方式,運用所有下載的資源建構網頁。
與瀏覽器相比,由於排程限制 (例如伺服器解譯負載,伺服器會代管轉譯網頁所需的資源),每個步驟之間的時間可能會大幅延長。這時就要提到檢索預算了。
檢索轉譯網頁所需的資源,會耗用代管資源的主機名稱的檢索預算。為了改善這種情形,WRS 會嘗試快取轉譯網頁中參照的每個資源 (JavaScript 和 CSS)。WRS 快取的存留時間 (TTL) 不會受到 HTTP 快取指令的影響;相反地,WRS 會快取最多 30 天內的所有內容,這有助於保留網站的檢索預算,以便執行其他檢索工作。
從網站擁有者的角度來看,管理檢索的方式和資源可能會影響網站的檢索預算。建議您採取以下做法:
- 盡可能減少資源使用量,以便提供優質的使用者體驗;轉譯網頁所需的資源越少,轉換期間要使用的檢索預算就越少。
- 謹慎使用快取清除參數,只要資源的網址有變更,Google 就可能需要重新檢索這些資源,即使內容沒變也一樣。這樣勢必會耗用檢索預算。
- 將資源代管在主網站以外的主機名稱上,例如採用 CDN 或在其他子網域上代管資源。這會將檢索預算問題轉移至提供資源的主機。
這些要點也適用於媒體資源。如果 Googlebot (或更具體地說,分別為 Googlebot-Image
和 Googlebot-Video
) 擷取這些資源,就會耗用網站的檢索預算。
您可能會想將 robots.txt 也加入清單,但從轉譯角度來看,禁止檢索資源通常會導致問題。如果 WRS 無法擷取轉譯關鍵資源,Google 搜尋可能就無法擷取網頁內容,也無法讓網頁在 Google 搜尋中排名。
Googlebot 會檢索哪些內容?
要分析 Google 檢索了哪些資源,最好的來源是網站的原始存取記錄,其中包含瀏覽器和檢索器要求的每個網址項目。如要瞭解如何在存取記錄中識別 Google 檢索器,請參閱開發人員說明文件中的 IP 範圍。
當然,第二個最佳資源是 Search Console 檢索統計資料報告,這份報告會依檢索器列出各種類型的資源:

最後,如果您對檢索和轉譯有興趣,並想與其他人討論相關主題,歡迎加入搜尋中心社群,您也可以在 LinkedIn 上找到我們。
更新
- 2024 年 12 月 6 日更新:註明透過不同來源提供資源會對成效造成影響。
想進一步瞭解檢索嗎?請觀看完整的「檢索 12 月」系列影片:
Google Ads API
建立用於管理大型 Google Ads 帳戶和廣告活動的工具。
Genkit
Code-first framework for orchestrating, deploying, and monitoring generative AI workflows.
Blockly 無障礙功能總覽
Blockly 致力於為開發人員、學生和機構提供積木式程式設計支援
Android Developers
Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.
Privacy Sandbox
注重隱私權的 API 和更新,適用於 Cookie、廣告、身分、個人化和防範詐欺行為。
Chrome Extensions
瞭解如何開發 Chrome 擴充功能。
Google Maps Platform
目前已有數百萬個網站和應用程式採用 Google 地圖平台,為使用者提供更優質的位置搜尋體驗。
Firebase Test Lab
Firebase Test Lab is a cloud-based app testing infrastructure that lets you test your app on a range of devices and configurations, so you can get a better idea of how it'll perform in the hands of your users.
Cloud Storage for Firebase
Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale.
Firebase Performance Monitoring
Firebase Performance Monitoring is a service that developers gain insights into the performance characteristics of Apple, Android, and web apps.
Firebase In-App Messaging
Firebase In-App Messaging helps you engage your app's active users by sending them targeted, contextual messages that encourage them to use key app features.
Firebase Remote Config
Change the behavior and appearance of your app without publishing an app update, at no cost, for unlimited daily active users.
Firebase Hosting
Firebase Hosting provides fast and secure hosting for static and single-page web apps.
Firestore
Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud..
Cloud Functions for Firebase
Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests.
Firebase App Distribution
Firebase App Distribution makes distributing your apps to trusted testers painless. By getting your apps onto testers' devices quickly, you can get feedback early and often. And if you use Crashlytics in your apps, you’ll automatically get stability metrics for all your builds, so you know when you’re ready to ship.
Firebase Realtime Database
透過我們的 NoSQL 雲端資料庫儲存及同步處理資料。系統會即時同步處理所有用戶端的資料,而且即使應用程式離線,你仍可存取資料。
Gemini in Firebase
"Gemini in Firebase is an AI-assistive tool that helps you get answers to questions about Firebase products and features, generates and explains code for development, and shortens your troubleshooting process."
Firebase Cloud Messaging
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.
Firebase App Check
App Check helps protect your app from abuse by attesting that incoming traffic is coming from your app and blocking traffic without valid credentials.
Firebase App Hosting
Firebase App Hosting is a framework that provides serverless hosting for modern, full-stack and AI web apps.
Firebase Authentication
Firebase Authentication lets you add an end-to-end identity solution to your app for easy user authentication, sign-in, and onboarding in just a few lines of code.
Firebase Crashlytics
Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality.
Firebase Extensions
Designed to increase productivity, Firebase Extensions provide extended functionality to your apps without the need to research, write, or debug code on your own.
Vertex AI in Firebase
Build AI-powered mobile and web apps and features with the Gemini API using Vertex AI in Firebase
Jetpack
Follow best practices, eliminate boilerplate code, and reduce fragmentation
開始使用 Gemma 模型
Gemma 開放式模型系列包含各種模型大小、功能和專門工作變化版本,可協助您建構自訂生成式解決方案。以下是應用程式中使用 Gemma 模型時,可遵循的主要路徑: 這份指南可協助您開始 挑選 模型、 測試 模型功能,以及視需要 微調 為應用程式選取的模型。 本節將說明 Gemma 模型系列的官方變化版本,以及如何為應用程式選取模型。模型變化版本提供一般功能,或專門用於特定工作,且提供不同參數大小,讓您能選擇具備所需功能且符合運算需求的模型。 下表列出 Gemma
透過 Gemini Code Assist 為個人編寫程式碼
如何在 IDE 中使用 Gemini Code Assist。
ARCore
歡迎瀏覽相關連結,進一步瞭解並開始使用相關技術,打造全球規模的沉浸式擴增實境體驗。
Android TV
建構 Android TV 應用程式。