使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
从搜索结果中移除您网站上托管的图片
在紧急情况下移除图片
如需从 Google 搜索结果中快速移除托管在您网站上的图片,请使用“移除”工具。
请注意,除非您还从您的网站中移除图片或屏蔽图片(如“非紧急图片移除”部分中所述),否则当内容移除要求失效后,这些图片可能会重新出现在 Google 的搜索结果中。
在非紧急情况下移除图片
您可以通过以下两种方式从 Google 搜索结果中移除您网站中的图片:
这两种方法的效果相同,请选择对您的网站来说更方便的方法。
请注意,Googlebot 必须抓取网址才能提取 HTTP 标头,因此同时实现这两种方法是不合理的。
如果您无法访问托管您的图片的网站(例如 CDN),或者您的 CMS 未提供使用 noindex
X-Robots-Tag
HTTP 标头或 robots.txt 屏蔽图片的方法,您可能需要从网站中彻底删除相应图片。
使用 robots.txt 规则移除图片
若要阻止您网站上的图片显示在 Google 搜索结果中,请在托管相应图片的网站的根目录下添加 robots.txt 文件,例如 https://yoursite.example.com/robots.txt
。虽然与使用“移除”工具相比,使用 robots.txt 规则从 Google 搜索结果中移除图片需要更长的时间,但这种使用通配符或子路径屏蔽的方法可让您有更多的灵活性和控制权。这种方法还适用于所有搜索引擎,而“移除”工具仅适用于 Google。
例如,如果您希望 Google 排除您网站上显示的 dogs.jpg
图片(网址为 yoursite.example.com/images/dogs.jpg
),请在 robots.txt 文件中添加以下内容:
User-agent: Googlebot-Image
Disallow: /images/dogs.jpg
下次 Google 抓取 dogs.jpg
图片时,我们就会根据这条规则从 Google 图片搜索结果中排除您的图片。
规则可以包含特殊字符,以实现更好的灵活性和控制。具体而言,*
字符可与任意字符序列相匹配,可让您使用一条规则匹配多个图片路径。
如需从 Google 索引中移除您网站上的多张图片,请为每张图片添加 disallow
规则,或者如果这些图片使用相同的格式(例如在文件名中添加后缀),请在文件名中使用 *
字符。例如:
User-agent: Googlebot-Image
# Repeated 'disallow' rules for each image:
Disallow: /images/dogs.jpg
Disallow: /images/cats.jpg
Disallow: /images/llamas.jpg
# Wildcard character in the filename for
# images that share a common suffix. For example,
# animal-picture-UNICORN.jpg and
# animal-picture-SQUIRREL.jpg
# in the "images" directory
# will be matched by this pattern.
Disallow: /images/animal-picture-*.jpg
如需从我们的索引中移除您网站上的所有图片,请在 robots.txt 文件中加入以下规则:
User-agent: Googlebot-Image
Disallow: /
如需移除某一文件类型的所有文件(例如,要包含 .jpg
图片但排除 .gif
图片),请使用下列 robots.txt 指令:
User-agent: Googlebot-Image
Disallow: /*.gif$
通过将 Googlebot-Image
指定为 User-agent
,可将图片从 Google 图片搜索结果中排除。若想将这些图片从 Google 的所有搜索结果(包括 Google 搜索和 Google 图片)中排除,请指定 Googlebot
用户代理。
使用 noindex
X-Robots-Tag
HTTP 标头移除图片
或者,您可以将 noindex
X-Robots-Tag
添加到您要移除的图片的 HTTP 响应标头中,从 Google 搜索结果中移除托管在您网站上的图片。在这种情况下,您必须允许抓取图片网址,这样 Googlebot 才能提取 noindex
规则。如需实现 noindex
X-Robots-Tag
HTTP 响应标头,请遵循我们关于 noindex
的文档。
请注意,向特定网页添加 noimageindex
漫游器标记也会阻止该网页中嵌入的图片编入索引。不过,如果这些图片也出现在其他网页中,则可能会通过这些网页编入索引。为了确保特定图片无论出现在何处都被屏蔽,请使用 noindex
X-Robots-Tag
HTTP 响应标头。
如何从不归我所有的资源中移除图片?
请参阅关于如何从搜索结果中移除图片的 Google 搜索帮助文档。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-04。
[[["易于理解","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\u003eRemove images from Google Search quickly using the Removals tool for emergencies, but note that images may reappear unless removed from your site or blocked.\u003c/p\u003e\n"],["\u003cp\u003eFor non-emergency removals, prevent images from appearing in Google Search using robots.txt disallow rules or the \u003ccode\u003enoindex\u003c/code\u003e \u003ccode\u003eX-Robots-Tag\u003c/code\u003e HTTP header, choosing the method best suited for your site.\u003c/p\u003e\n"],["\u003cp\u003eUse robots.txt to control which images Google can index by specifying rules for individual images, file types, or all images on your site within the robots.txt file.\u003c/p\u003e\n"],["\u003cp\u003eAlternatively, utilize the \u003ccode\u003enoindex\u003c/code\u003e \u003ccode\u003eX-Robots-Tag\u003c/code\u003e HTTP header to remove images from Google Search, ensuring Googlebot can crawl the image URLs to extract the rule.\u003c/p\u003e\n"],["\u003cp\u003eRefer to Google Search help documentation for guidance on removing images from properties you don't own.\u003c/p\u003e\n"]]],["To remove images from Google Search, use the Removals tool for quick removal, but note images may reappear. For a lasting solution, use `robots.txt` rules or the `noindex` `X-Robots-Tag` HTTP header. `robots.txt` blocks images using file paths or wildcards, and applies to all search engines. The `noindex` header prevents indexing but requires Googlebot to crawl the URLs. For images on others' sites, refer to Google's help documentation.\n"],null,["# Remove your own site's images from Google Search | Google Search Central\n\nRemove images hosted on your site from search results\n=====================================================\n\n| Trying to **remove images of yourself** ? See [Remove your personal information from Google](https://support.google.com/websearch/troubleshooter/3111061) instead.\n\nFor emergency image removal\n---------------------------\n\n\nTo quickly remove images hosted on your site from Google's search results, use the\n[Removals tool](https://support.google.com/webmasters/answer/9689846#zippy=%2Cimage-url).\nKeep in mind that unless you also remove the images from your site or otherwise block the images\nas described in the [non-emergency image removal section](#non-emergency-image-removal),\nthe images may resurface in Google's search results once the removal request expires.\n\nFor non-emergency image removal\n-------------------------------\n\n\nThere are two ways to remove images from your site from Google's search results:\n\n- [robots.txt disallow rules](#robotstxt)\n- [The `noindex` `X-Robots-Tag` HTTP header](#noindex)\n\n\nThe two methods have the same effect, choose the method that is more convenient for your site.\nKeep in mind that Googlebot has to crawl the URLs to extract the HTTP headers, so implementing\nboth methods at the same time doesn't make sense.\n\n\nIf you don't have access to the site that's hosting your images (for example a CDN) or your CMS\ndoesn't provide a way to block images with the `noindex` `X-Robots-Tag` HTTP\nheader or robots.txt, you might need to delete the images altogether from your site.\n\n### Remove images using robots.txt rules\n\n\nTo prevent images from your site appearing in Google's search results, add a\n[robots.txt](/search/docs/crawling-indexing/robots/intro) file to the root of the\nsite that hosts the image, for example `https://yoursite.example.com/robots.txt`. While\nit takes longer to remove an image from Google's search results using robots.txt rules than it\ndoes to use the Removals tool, it gives you more flexibility and control through the use of\nwildcards or subpath blocking. It also applies to all search engines, whereas the Removals tool\nonly applies to Google.\n\n\nFor example, if you want Google to exclude the `dogs.jpg` image that appears on your\nsite at `yoursite.example.com/images/dogs.jpg`, add the following to your robots.txt\nfile: \n\n```\nUser-agent: Googlebot-Image\nDisallow: /images/dogs.jpg\n```\n\n\nThe next time Google crawls the `dogs.jpg` image, we'll see this rule and drop your\nimage from our search results.\n\n\nRules may include\n[special characters](/search/docs/crawling-indexing/robots/robots_txt#url-matching-based-on-path-values)\nfor more flexibility and control. Specifically, the `*` character matches any sequence\nof characters which lets you to match multiple image paths with one rule.\n\n\nTo remove multiple images on your site from Google's index, add a `disallow` rule for\neach image, or if the images share a common pattern such as a suffix in the filename, use a\nthe `*` character in the filename. For example: \n\n```\nUser-agent: Googlebot-Image\n# Repeated 'disallow' rules for each image:\nDisallow: /images/dogs.jpg\nDisallow: /images/cats.jpg\nDisallow: /images/llamas.jpg\n\n# Wildcard character in the filename for\n# images that share a common suffix. For example,\n# animal-picture-UNICORN.jpg and\n# animal-picture-SQUIRREL.jpg\n# in the \"images\" directory\n# will be matched by this pattern.\nDisallow: /images/animal-picture-*.jpg\n```\n\n\nTo remove all the images on your site from our index, place the following rule in your robots.txt\nfile: \n\n```\nUser-agent: Googlebot-Image\nDisallow: /\n```\n\n\nTo remove all files of a specific file type (for example, to include `.jpg` but not\n`.gif` images), you'd use the following robots.txt entry: \n\n```\nUser-agent: Googlebot-Image\nDisallow: /*.gif$\n```\n\n\nBy specifying `Googlebot-Image` as the `User-agent`, the images will be\nexcluded from Google Images. If you would like to exclude the images from all Google searches\n(including Google Search and Google Images), specify the `Googlebot` user agent.\n\n### Remove images with the `noindex` `X-Robots-Tag` HTTP header\n\n\nAlternatively, you can remove images hosted on your site from Google's search results by\nadding the `noindex` `X-Robots-Tag` to the HTTP response headers of the\nimages you want to remove. In this case you must allow crawling the image URLs in order for\nGooglebot to be able to extract the `noindex` rule. To implement the\n`noindex` `X-Robots-Tag` HTTP response header,\n[follow our documentation about `noindex`](/search/docs/crawling-indexing/robots-meta-tag#xrobotstag-implementation).\n\n\nNote that adding the `noimageindex` robots tag to a particular page will also prevent\nthat images embedded in that page from getting indexed. However, if the same images also appear in\nother pages, they might get indexed through those pages. To make sure a particular image is\nblocked no matter where it appears, use the `noindex` `X-Robots-Tag` HTTP\nresponse header.\n\nHow do I remove images from properties that I don't own?\n--------------------------------------------------------\n\n\nSee the\n[Google Search help documentation on how to remove an image from search results](https://support.google.com/websearch/answer/4628134)."]]