请注意,在您发布了修正版内容之后,Google 不会立即抓取您的网页。因此,Search Console(和 Google 搜索)可能会继续显示您已修正的网页存在错误,直到 Google 再次抓取该网页时为止。有时候,您可以请求加速抓取(例如使用网址检查工具),但在大多数情况下,Google 要过几天才能注意到您网页中的更改。
Google 提供了多种测试工具来测试单个实际网页。例如,AMP 测试工具和富媒体搜索结果测试。
即使您的网页是在本地计算机上运行且无公开网址,或者是托管在防火墙后面,只要为测试工具提供一个指向您的网页的隧道,就仍然可以测试该网页。
这种做法在以下情况下可能有用:您希望在将某网页公开发布于网上之前测试该网页,或者想将测试网页作为发布流程中的另一个步骤。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-04。"],[[["\u003cp\u003eGoogle Search and Search Console may display errors even after you've fixed them, as crawling isn't immediate and can take a few days for changes to be reflected.\u003c/p\u003e\n"],["\u003cp\u003eUtilize various Google testing tools like the URL Inspection tool or Rich Results Test to debug and understand how Google perceives your pages.\u003c/p\u003e\n"],["\u003cp\u003eFor pages behind firewalls or hosted locally, use tunneling solutions like \u003ccode\u003engrok\u003c/code\u003e to expose them for testing with Google's tools.\u003c/p\u003e\n"],["\u003cp\u003eWhen facing access errors during testing, ensure your page isn't blocked by robots.txt, login requirements, or firewall restrictions.\u003c/p\u003e\n"],["\u003cp\u003eSearch Console offers valuable site monitoring and testing tools but requires site ownership verification for access to confidential data.\u003c/p\u003e\n"]]],["Google offers various tools for debugging web pages. Search Console, requiring site verification, provides tools like Rich Result status reports and the URL Inspection tool for in-depth analysis and recrawl requests. Anonymous tools, such as the AMP and Rich Results Tests, are available for any URL. To test locally-hosted or firewalled pages, utilize tunneling solutions like ngrok to create a public URL. If facing access errors ensure your page is not blocked by robots.txt and try accessing from another network or incognito mode.\n"],null,["# Debug Your Website Pages | Google Search Central\n\nDebugging your pages\n====================\n\nGeneral tips\n------------\n\n\nRemember that Google does not crawl your page immediately after you publish a fix. Therefore\n[Search Console](https://search.google.com/search-console) (and Google Search) can\ncontinue to show an error for a page that you have fixed\nuntil the page is crawled again. You can sometimes request an expedited crawl, for example\nusing the [URL Inspection](https://support.google.com/webmasters/answer/9012289)\ntool, but in most cases it takes a few days to notice changes in your pages.\n\nUseful testing tools\n--------------------\n\n\nHere are some useful tools to help you debug your pages.\n\n### Verified site owner tools\n\n\nThe following tools and reports require you to be a\n[verified site user](https://support.google.com/webmasters/answer/9008080)\nfor the page in order to use this tool on that page or site. This is because Search Console\nprovides confidential site data that only a verified site user should have access to.\n\n- [Search Console](https://search.google.com/search-console) - Sign up for Search Console and [verify ownership of a site](https://support.google.com/webmasters/answer/9008080) to get access to useful site monitoring and testing tools, such as those listed below.\n- [Rich result status reports](https://support.google.com/webmasters/answer/7552505) - Learn which rich results Google could or couldn't read from your site, get troubleshooting information for rich result errors, and request a recrawl after you have fixed any problems. You cannot test an arbitrary URL using this tool.\n- [URL Inspection tool](https://support.google.com/webmasters/answer/9012289) - Learn how your page appears in the Google index, run an index test on a live URL, and see how Google renders your page, and submit a URL for indexing.\n- [Robots.txt report](https://support.google.com/webmasters/answer/6062598) - Check whether Google can process your robots.txt files. You an also request a recrawl of a robots.txt file for emergency situations.\n- [AMP status report](https://search.google.com/search-console/amp) - See AMP page errors for your entire site detected by Google. Errors are detected during the regular crawl; you cannot test an arbitrary URL.\n\n### Anonymous tools\n\n\nThese tools can be used on any URL without needing Search Console permissions on the website.\nSome tools also allow code snippets pasted into the tool itself.\n\n\nIf your URL is behind a firewall, or is hosted on a local computer, you can use a tunnelling\nsolution to expose your page to the testing tool. [Learn how to test locally-hosted or firewalled pages.](#testing-firewalled-pages)\n\n- [AMP Test Tool](https://search.google.com/test/amp) - Test the validity of a specific AMP URL in real time.\n- [Rich Results Test](https://search.google.com/test/rich-results) - Test the validity of a structured data block in real time. The code can either be pasted into the tool, or hosted on a live page.\n\n### More tools\n\n\nSee [our help page](/search/help) for more resources and office hours information.\n\nTesting locally-hosted or firewalled pages\n------------------------------------------\n\n\nGoogle provides several testing tools to test a single live web page. For example, the\n[AMP Test Tool](https://search.google.com/test/amp) and the\n[Rich Results Test](https://search.google.com/test/rich-results).\nHowever, if your page is running on your local machine without a public\nURL, or if it is hosted behind a firewall, you can still test the page by exposing a tunnel to\nyour page for the testing tool.\nThis can be useful if you want to test a page before making it publicly available on the web,\nor even as another step in your release process.\n\n\nTo test a local or firewalled page, use a tunneling solution such as `ngrok`. These\ntools provide a public URL that connects to a non-public page on your local host or firewalled\nserver.\n\n\nThe following example first starts up python's\n[`SimpleHTTPServer`](https://docs.python.org/2/library/simplehttpserver.html)\nto host a page on the local computer, then uses\n[ngrok](https://ngrok.com/) to expose that page on a\npublicly-accessible URL:\n\n**Step 1**\n\n\nStart up a local HTTP server to host your page on a given port. For our example we chose port\n`5326`.\n\n\n`SimpleHTTPServer` maps the current directory as the site root. \n\n python3 -m http.server 5326\n Serving HTTP on 0.0.0.0 port 5326\n ...\n\n\n**Step 2**\n\n\nOn another terminal, start up your local `ngrok` app, listening to port\n`5326`, which we opened in step 1. \n\n ./ngrok http 5326 --request-header-add ngrok-skip-browser-warning:1\n ngrok by @inconshreveable (Ctrl+C to quit)\n\n Session Status online\n Version 2.2.4\n Region United States (us)\n Web Interface http://127.0.0.1:4040\n Forwarding http://ad0a5735.ngrok.io -\u003e localhost:5326\n Forwarding https://ad0a5735.ngrok.io -\u003e localhost:5326\n\n Connections ttl opn rt1 rt5 p50 p90\n 0 0 0.00 0.00 0.00 0.00\n\n\n**Step 3**\n\n\nPass your exposed ngrok URL to the test tool of your choice.\n\n\nThe root URL in our example is `http://ad0a5735.ngrok.io`, so if our page is saved\nlocally at `~/testwebdir/mypage.html`, and we started the server above from\n`~/testwebdir/`, we could test `http://ad0a5735.ngrok.io/mypage.html`.\nIn the Rich Results Test, you could paste that URL in directly, or visit\n`https://search.google.com/test/rich-results/result?url=http%3A%2F%2Fad0a5735.ngrok.io%2Fmypage.html`.\n\n\nNote that different local hosts and tunneling solutions map your pages differently.\n\n\nAlso, some tunneling solutions (not ngrok) automatically protect your temporary public URL\nwith robots.txt, which will prevent you from running Google tests on them. Google testing\ntools respect robots.txt. Read the documentation for your tunneling solution and web hosting\nsoftware.\n\n### Debugging access errors\n\n\nIf you get an access error using a Google testing tool:\n\n- Check that your page isn't protected by robots.txt and doesn't require a login.\n- Try accessing your page from outside your firewall, on another computer, or using Chrome in Incognito mode."]]