cheap web hosting

How to stop Google Image indexing (images only)

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.
fifeclub's picture

He has: 675 posts

Joined: Feb 2001

I put a neat little geo-traffic widget on my site called feedjit, and it's revealing to me that half of all my visitors are coming to my website from image searches. Most are from google images, not just from the United States but TONS of foreign countries all over the earth. And a sparse few from Yahoo images too.

A while ago I added a robots.txt file as follows

User-Agent: Googlebot-Image
Disallow: /

'

But nothing seems to have changed. Is the robots.txt file the way to go? If so, do I need to list the images-agent for every country on earth (that has a localized google version)? If so, where can I find that list of different google image bots?

Thanks

Nip it in the bud!

mscreashuns's picture

He has: 557 posts

Joined: Jul 2005

From what I have read, a robots.txt file may not be sufficient, and it certainly will not be sufficient right away. It will not produce any major results at least until the next time your site is crawled by Google.

In addition to the robots.txt file, updating your .htaccess file (if possible) may provide a solution. I don't have a lot of knowledge on the use of the .htaccess file, but to forbid hotlinking of your images uses the following:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]

'

Or, if you want to just prevent google.com from hotlinking, try something like this:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?google\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]

'

fifeclub's picture

He has: 675 posts

Joined: Feb 2001

I've had all my images protected for years. I'm not 100% sure exactly how Hot Link protection works but I think the search engines are indexing images and saving compressed copies on their servers, not hot linking to the files.

Nip it in the bud!

teammatt3's picture
Moderator

He has: 1,845 posts

Joined: Sep 2003

If you don't mind me asking, why do you want to stop Google from indexing your images when you're getting traffic from it? Image traffic isn't usually high quality stuff, but it's better than nothing. Smiling

He has: 314 posts

Joined: May 2007

Like others here, I am unsure exactly as to what your motives might be. However, once captured by Google, it may be some time before they come back and take note of your robots.txt file, although Google does respect your wishes here. (Unlike some search engines, I hear.)

To frustrate visitors who use Google's captured links, you can always move your images to a different folder. Better check all your links, though! Wink Mscreashuns has the right idea for limiting access - you may like to read a bit more about the technique, and how you can adapt it to your needs, on this article on Smarter Image Hotlinking Prevention at A List Apart.

Cordially, David
--
"Old web developers don't die, they degrade gracefully..."

fifeclub's picture

He has: 675 posts

Joined: Feb 2001

For a while I didn't mind. I'm not in any business so I don't benefit, but itt's not causing me any bandwidth problems. And nobody is hotlinking that I know of so that's not the problem. But until earlier this year I didn't realize just how much it was happening from all over the world.

I suppose the biggest reason why I want to stop it is the creepiness factor. This is a very weird search term that I've never actually seen in my tracking, but it is a perfect illustration of the situation. I was searching Google images just this week and 13 or the 20 images results on the first page are from my website. Only 2 are related to my search terms in any way, but the thing that concerns me the most is that 4 of the photos are of my newborn baby daughter!!! That's just creepy. I don't like that.

http://images.google.com/images?hl=en&safe=off&client=firefox-a&rls=org.mozilla:en-US:official&hs=zhI&resnum=0&q=DISC+GOLF+ANTIPIXEL&um=1&ie=UTF-8&sa=N&tab=wi

I tried to stop in with that robots.txt code I posted above but after 6 months nothing changed. Is my robots code correct? Do I need different code for every country tld?

Nip it in the bud!