使用 Google 模擬器轉譯網頁
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
2014年5月28日星期三
原文:Rendering pages with Fetch as Google
作者:
Shimi Salant, Webmaster Tools team
網站管理員工具中的 Google 模擬器功能
可供網站管理員檢視 Googlebot 嘗試擷取自己網頁的結果。其中顯示的伺服器標頭和 HTML 可方便網站管理員診斷技術問題和網站遭入侵的副作用,但有時卻會造成重複確認回應發生困難:
求救!
這些程式碼代表什麼意思?
這個網頁真的和我在自己的瀏覽器中看到的網頁相同嗎?
我們要去哪吃午餐?
最後一個問題我們幫不上忙,至於其他問題,我們近期已擴充這項工具的功能,可供您查看 Googlebot 轉譯網頁的結果。
檢視轉譯的網頁
為了轉譯網頁,Googlebot 會嘗試找出所有相關的外部檔案並擷取這些檔案,其中通常包括圖片、CSS 樣式表和 JavaScript 檔案,以及其他可能間接透過 CSS 樣式表或 JavaScript 嵌入網頁的檔案。系統會運用這些檔案轉譯預覽圖片,供您查看網頁在 Googlebot 中顯示的樣貌。
處理遭 robots.txt 封鎖的資源
Googlebot 會遵循
robots.txt 指示詞
來擷取所有檔案。如果您禁止系統檢索部分檔案 (或是您用來嵌入檔案的第三方伺服器不允許 Googlebot 檢索這些檔案),我們將無法在轉譯畫面中顯示這些檔案。同樣地,如果伺服器無法回應或傳回錯誤,我們也無法使用這些檔案 (您可以在網站管理員工具中的「
檢索錯誤
」區找到類似問題)。如果遇到上述問題,系統會在預覽圖片下方顯示相關資訊。
建議您先確定 Googlebot 可以存取任何會影響網站顯示內容和版面配置的重要內嵌資源,如此一來,您在使用 Google 模擬器時會更加輕鬆,同時也能讓 Googlebot 找到相關內容並建立索引。部分類型的內容 (例如社交媒體按鈕、字型或網站分析指令碼) 通常不涉及網站的顯示內容和版面配置,因此禁止 Googlebot 檢索這類內容不會有所影響。如需更多資訊,請參閱我們之前針對
Google 如何設法進一步瞭解網頁內容
所撰寫的網誌文章。
希望這項更新能協助您輕鬆診斷這類問題,並找出意外禁止 Googlebot 檢索的內容。如果您有任何意見或疑問,歡迎通知我們或造訪
網站管理員說明論壇
。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2014-05-01 (世界標準時間)。
[null,null,["上次更新時間:2014-05-01 (世界標準時間)。"],[[["\u003cp\u003eGoogle Webmaster Tools now includes a "Fetch and Render" feature, allowing webmasters to see how Googlebot renders their pages, including handling of external resources like images, CSS, and JavaScript.\u003c/p\u003e\n"],["\u003cp\u003eThe rendered view helps diagnose technical issues and understand how Googlebot perceives a page's content and layout, especially concerning blocked resources.\u003c/p\u003e\n"],["\u003cp\u003eGoogle recommends allowing Googlebot access to crucial embedded resources that impact content visibility and layout for better rendering and indexing.\u003c/p\u003e\n"],["\u003cp\u003eResources like social media buttons or analytics scripts, which don't significantly impact visible content, can remain disallowed from crawling.\u003c/p\u003e\n"],["\u003cp\u003eThis update aims to simplify issue diagnosis and identify content unintentionally blocked from Google's crawling process.\u003c/p\u003e\n"]]],["The Fetch as Google feature, found in Google Webmaster Tools, allows users to see how Googlebot renders a webpage. This tool fetches external files like images, CSS, and JavaScript to create a preview image. Users can submit a URL using \"Fetch and render\" and view the results after processing. It follows robots.txt rules, and resources blocked or with server errors won't be rendered. Ensuring Googlebot can access essential resources improves the tool's effectiveness and content indexing.\n"],null,["# Rendering pages with Fetch as Google\n\n| It's been a while since we published this blog post. Some of the information may be outdated (for example, some images may be missing, and some links may not work anymore). Check how Google renders your page with the [URL inspection tool](https://search.google.com/search-console#view_screenshot) or [Rich Results Test](https://search.google.com/test/rich-results).\n\nTuesday, May 27, 2014\n\n\nThe\n[Fetch as Google feature in Webmaster Tools](https://support.google.com/webmasters/answer/158587)\nprovides webmasters with the results of Googlebot attempting to fetch their pages. The server\nheaders and HTML shown are useful to diagnose technical problems and hacking side-effects, but\nsometimes make double-checking the response hard: *Help! What do all of these codes mean? Is\nthis really the same page as I see it in my browser? Where shall we have lunch?* We can't help\nwith that last one, but for the rest, we've recently expanded this tool to also show how Googlebot\nwould be able to render the page.\n\nViewing the rendered page\n-------------------------\n\n\nIn order to render the page, Googlebot will try to find all the external files involved, and fetch\nthem as well. Those files frequently include images, CSS and JavaScript files, as well as other\nfiles that might be indirectly embedded through the CSS or JavaScript. These are then used to\nrender a preview image that shows Googlebot's view of the page.\n\n\nYou can find the\n[Fetch as Google feature](https://www.google.com/webmasters/tools/googlebot-fetch)\nin the Crawl section of\n[Google Webmaster Tools](https://search.google.com/search-console).\nAfter submitting a URL with \"Fetch and render,\" wait for it to be processed (this might take a\nmoment for some pages). Once it's ready, just click on the response row to see the results.\n\nHandling resources blocked by robots.txt\n----------------------------------------\n\n\nGooglebot follows the [robots.txt rules](/search/docs/crawling-indexing/robots/intro)\nfor all files that it fetches. If you are disallowing crawling of some of these files (or if they\nare embedded from a third-party server that's disallowing Googlebot's crawling of them), we won't\nbe able to show them to you in the rendered view. Similarly, if the server fails to respond or\nreturns errors, then we won't be able to use those either (you can find similar issues in the\n[Crawl Errors](https://support.google.com/webmasters/answer/35120)\nsection of Webmaster Tools). If we run across either of these issues, we'll show them below the\npreview image.\n\n\nWe recommend making sure Googlebot can access any embedded resource that meaningfully contributes\nto your site's visible content, or to its layout. That will make Fetch as Google easier for you\nto use, and will make it possible for Googlebot to find and index that content as well. Some types\nof content---such as social media buttons, fonts or website-analytics scripts---tend not\nto meaningfully contribute to the visible content or layout, and can be left disallowed from\ncrawling. For more information, please see our previous blog post on\n[how Google is working to understand the web better](/search/blog/2014/05/understanding-web-pages-better).\n\n\nWe hope this update makes it easier for you to diagnose these kinds of issues, and to discover\ncontent that's accidentally blocked from crawling. If you have any comments or questions, let us\nknow here or drop by in the\n[webmaster help forum](https://support.google.com/webmasters/threads?hl=en&thread_filter=(category:search_console)).\n\nPosted by Shimi Salant, Webmaster Tools team"]]