5

I have a site where much of the focus are the images themselves. When people visit the website directly (with an AdSense ad shown), the image shows in normal high-quality.

When robots visit the image, they will see a watermarked version. The reason for this is because the photographer of the site dedicates his time in taking high quality pictures and it would be nice if he could profit from it.

What I tried for a month straight is to have the watermarked versions of the image indexed with Google so that when a user clicks on it, they will know more about the website since its stamped on the watermarked image. The problem is not a single watermarked image is indexed.

What I did in the past was allow everyone to see the image the same way (unmodified, no watermark, and high quality), then all the images were indexed. I learned doing that is a mistake because then people could simply download the images right off Google without seeing my website or even an ad.

In both cases, I have submitted sitemaps pointing to valid URLs and I did not use any noindex or noimageindex robot tags and I did not use robots.txt to deny access to the images.

Is there a way I can have watermarked images indexed with Google?

2
  • 5
    You should never attempt to serve search engines different content no matter the reasons behind it. This is recommended by Google and Bing as it can be considered black hat and a form of cloaking. Some big image sites will append a black banner at the bottom of the image and have something among the lines click the download button to download a image without this annoying banner. Then you just ensure that you have a robots.txt setup to where the images are without the banner, this way you never index those images. But people reusing your images if unqine can help your image rankings, so... Sep 27, 2015 at 17:52
  • 1
    personally, I dislike any form of watermarking unless your selling those images and then I can see reasons behind it, because often people using your images means your getting image clicks which can increase your Google image rankings. Sep 27, 2015 at 17:57

3 Answers 3

1

The ideal way would be handling this at nginx level.

Do something like this:

  • If page requested == "/images/watermark.jpg"
  • If useragent == bot
  • Rewrite (internal) to something like "/images/bot/watermark.jpg"

Step 1

Add this in your nginx config.

map $http_user_agent $limit_bots {
     default 0;
     ~*(google|bing|yandex|msnbot) 1;
     ~*(AltaVista|Googlebot|Slurp|BlackWidow|Bot|ChinaClaw|Custo|DISCo|Download|Demon|eCatch|EirGrabber|EmailSiphon|EmailWolf|SuperHTTP|Surfbot|WebWhacker) 1;
     ~*(Express|WebPictures|ExtractorPro|EyeNetIE|FlashGet|GetRight|GetWeb!|Go!Zilla|Go-Ahead-Got-It|GrabNet|Grafula|HMView|Go!Zilla|Go-Ahead-Got-It) 1;
     ~*(rafula|HMView|HTTrack|Stripper|Sucker|Indy|InterGET|Ninja|JetCar|Spider|larbin|LeechFTP|Downloader|tool|Navroad|NearSite|NetAnts|tAkeOut|WWWOFFLE) 1;
     ~*(GrabNet|NetSpider|Vampire|NetZIP|Octopus|Offline|PageGrabber|Foto|pavuk|pcBrowser|RealDownload|ReGet|SiteSnagger|SmartDownload|SuperBot|WebSpider) 1;
     ~*(Teleport|VoidEYE|Collector|WebAuto|WebCopier|WebFetch|WebGo|WebLeacher|WebReaper|WebSauger|eXtractor|Quester|WebStripper|WebZIP|Wget|Widow|Zeus) 1;
     ~*(Twengabot|htmlparser|libwww|Python|perl|urllib|scan|Curl|email|PycURL|Pyth|PyQ|WebCollector|WebCopy|webcraw) 1;
 } 

Step 2

Check for bot in location block as: (this is generic, you can also check only for watermark.jpg)

location / {
    if ($limit_bots = 1) {
              rewrite ^/images/(.*).(png|jpg|gif) /images/bot/$1.$2 ;
            }
}

1
  • As I stated in my question What I tried for a month straight is to have the watermarked versions of the image indexed with Google so that when a user clicks on it, they will know more about the website since its stamped on the watermarked image. The problem is not a single watermarked image is indexed.. I have taken server side steps to accomplish this with your method in the past and google wouldn't index the images. Oct 29, 2015 at 16:16
1

Here is an article about this where they explain how to implement it. Show full images on your own site, but only show the watermarked version in Google image search.

The basic technique is to choose which version to serve (watermarked or clean) based on HTTP Referer and User Agent.

  1. If the HTTP Referer is from your own site, show the clean version.
  2. If the HTTP User Agent is a bot, show the clean version.
  3. All other requests get the watermarked version.

That way the Googlebot can view the clean versions (so they can rank them), but users only see the clean version once they are on your site.

2
  • Good answer but I remembered one time displaying the real full-size image only to those with an HTTP referrer set to a URL on my site while displaying a smaller watermarked image to others and I received complaints that legit users were receiving the watermarked (pixelated) versions of the image in the website instead. I then assumed some devices don't send the referrer when requesting pages. Jun 26, 2016 at 19:07
  • The linked article suggests just showing the watermark for certain of site referrals and allowing blank referrals to get the full quality. If you take that approach, some Google users will still be able to view the full quality images from within Google image search. Jun 26, 2016 at 19:18
0

You should not do that, for reasons already mentioned by the comments. You could filter by user-agent strings. You can find a list of about 300 common user-agents given by bots here: http://www.robotstxt.org/db.html. Run through that list and decide what to show. But doing this for every pic? You can also check your logs to find out which bots are visiting and only check on them. But again: you better mark all images and only deliver high quality after payments.

The user-agent story is an answer at: https://stackoverflow.com/questions/422969/how-to-recognize-bots-with-php

2
  • Do not do this. Google will most likely "punish" you for doing this.
    – Cole Tobin
    Oct 1, 2015 at 22:15
  • Simon Hayter already stated that in the first comment and i also referred to that. Nevertheless, I just answered his question.
    – Terradon
    Oct 1, 2015 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.