Block Google Image Search in WordPress


Yesterday I had a post that linked to the website of a photographer who was annoyed at how significantly his traffic dropped as a result of the redesigned Google Image Search. I promised to follow that post with instructions on blocking Google Image Search from indexing images on a WordPress website.

The procedure is actually really straight forward and rather well documented by Google itself.

It basically involves modifying one file called robots.txt which dictates what search engines like Google can index on your website. WordPress as a content management system creates a virtual robots.txt file which you can see by going to

Since the file is a virtual file created by WordPress there is no way to modify it. You will instead need to create your own and upload it into the root directory of your web server. The first thing you should do is look at the robots.txt generated by WordPress and copy & paste the content into a new file on your computer.

Once you have done that. You will need to return down a row and paste in the following code:

User-agent: Googlebot-Image
Disallow: /

Once you’ve added that line of code save your new file as robots.txt and upload it into the root directory of your web server. Having done that Google Image Search should no longer index the images on your website.

Like I said in the previous post, I don’t think I will be doing this myself. I think Watermarking is a much better solution. However I think I lot of people might find this interesting, especially since it only prevents your images from being indexed and not your pages.