Skip to content

How To Prevent Google Image Search From Indexing Your Website

Don’t you hate it when Google Image Search indexes something that you don’t want to be shown in the image search results?

Fortunately, it’s easy to prevent Google Image Search from indexing your website’s images. You can stop them from index your entire website’s images, only a specific image, or images of a specific format. To do that, you would need to add to the robots.txt file of your website the following snippets.

Prevent A Single Image

If you want to block a single image from appearing in Google Image Search, then add following to your robots.txt file:

User-agent: Googlebot-Image
Disallow: /images/dogs.jpgCode language: HTTP (http)

The above code will block dogs.jpg image from appearing in image search.

Prevent A Specific File Format

If you want to block all of .gif images from appearing in image search, then add following to your robots.txt file:

User-agent: Googlebot-Image
Disallow: /*.gif$Code language: HTTP (http)

Now, all images will appear on the image search, but .gif images.

Prevent All Images

Last but not the least. If you want to block all the images from your website from appearing in the image search results, then add following to your robots.txt file:

User-agent: Googlebot-Image
Disallow: /Code language: HTTP (http)

2 thoughts on “How To Prevent Google Image Search From Indexing Your Website”

  1. How can i prevent a dedicated image folder from crawling/indexing by any search bot? Like Google search or image or bing search/image bot?

    1. User-agent: Googlebot-Image
      Disallow: /your-desired-folder/

      This blocks all bots from crawling that specific folder and anything in it.

Leave a Reply

Your email address will not be published. Required fields are marked *