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.jpg
Code 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)