Updated hotlink protection with new Google Image Search
Ian Evans
ianevans at digitalhit.com
Tue Feb 5 04:20:42 UTC 2013
As you can see from this thread on Webmasterworld
(http://www.webmasterworld.com/google/4537063.htm), a lot of people are
upset about the new Google Image Search changes that allow visitors to
see much larger previews of images without visiting the site. Google has
also stopped showing the site in the background which removes any
potential visits from people seeing the context of the image's "home".
I currently have use the following in my nginx.conf:
error_page 403 = /403.shtml;
expires 30d;
valid_referers none blocked *.example.com example.com ;
if ($invalid_referer) {
return 403;
}
The 403 page actually looks up the requested image in my database then
redirects the person to the page that it's part of.
That's worked for a years but it's not working as well in the new Google
Image Search and we're now serving up more image requests without their
surrounding pages, and yes, the advertising that allows me to travel to
take the shots at events. From the thread (and looking at my logs) it
appears that Google seems to be sending the referrer less and less,
especially in situations where people are logged into to Google.
While reading about this new search that has people up in arms I came
across this site and how they're handling it. When you see the larger
image preview pop up on the new Google search the image flashes for a
second then gets replaced by the image covered by a warning and an note
to click to see it without it:
https://www.google.com/search?q=site:fansshare.com&hl=en&safe=off&tbo=d&source=lnms&tbm=isch&sa=X&ei=SIEQUdDAPMnkygGKrYGACg&ved=0CAoQ_AUoAA&biw=1266&bih=878
Any idea how they're doing this? Any idea how to implement it with
nginx? From what I've read elsewhere some of the new hotlink options are
going as far as intercepting the image requests and adding overlays with
PHP and GD to create the overlays if they're not on the host site.
Thanks for any thoughts.
More information about the nginx
mailing list