# Updated hotlink protection with new Google Image Search

**URL:** <https://www.ruby-forum.com/t/updated-hotlink-protection-with-new-google-image-search/229496>\
**Category:** NGINX\
**Created:** [February 5, 2013, 5:21am UTC](https://www.ruby-forum.com/t/updated-hotlink-protection-with-new-google-image-search/229496 "2013-02-05T05:21:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterpiper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3e96dc/32.png) [@peterpiper](https://www.ruby-forum.com/u/peterpiper)\
**Post date:** [February 5, 2013, 5:21am UTC](https://www.ruby-forum.com/t/updated-hotlink-protection-with-new-google-image-search/229496/1 "2013-02-05T05:21:42Z")

</div>

As you can see from this thread on Webmasterworld  
([Google Images' New (Bing-like) Layout - Google Search and SEO forum at WebmasterWorld - 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](http://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](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.

---

<div class="post-metadata">

**Author:** ![peterpiper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3e96dc/32.png) [@peterpiper](https://www.ruby-forum.com/u/peterpiper)\
**Post date:** [February 22, 2013, 11:51am UTC](https://www.ruby-forum.com/t/updated-hotlink-protection-with-new-google-image-search/229496/2 "2013-02-22T11:51:28Z")

</div>

Hi Ian, we’ve just published an extensive blog post about how to achieve  
this kind of hotlinking protection against Google Images:

[http://pixabay.com/en/blog/posts/hotlinking-protection-and-watermarking-for-google-32/](http://pixabay.com/en/blog/posts/hotlinking-protection-and-watermarking-for-google-32/)

---

<div class="post-metadata">

**Author:** ![peterpiper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3e96dc/32.png) [@peterpiper](https://www.ruby-forum.com/u/peterpiper)\
**Post date:** [February 23, 2013, 11:08pm UTC](https://www.ruby-forum.com/t/updated-hotlink-protection-with-new-google-image-search/229496/3 "2013-02-23T23:08:06Z")

</div>

On 22/02/2013 5:51 AM, Namson Mon wrote:

> Hi Ian, we’ve just published an extensive blog post about how to achieve  
> this kind of hotlinking protection against Google Images:

> **[Hotlinking Protection and Watermarking for Google Images - Pixabay](https://pixabay.com/blog/posts/hotlinking-protection-and-watermarking-for-google--32/)**
>
> Due to inline linking, the last update of Google Images caused a loss of traffic for most publisher websites. Find out how to get back your visitors by applying a sophisticated hotlinking protection.

> 

Thanks for the link. I like the ideas in the post. Will have to see how  
I could integrate them with PHP file we use to locate the img in our  
database for the redirect. Great to see the traffic bounce back.

---

<div class="post-metadata">

**Author:** ![peterpiper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3e96dc/32.png) [@peterpiper](https://www.ruby-forum.com/u/peterpiper)\
**Post date:** [February 24, 2013, 7:37am UTC](https://www.ruby-forum.com/t/updated-hotlink-protection-with-new-google-image-search/229496/4 "2013-02-24T07:37:58Z")

</div>

On Fri, February 22, 2013 5:51 am, Namson Mon wrote:

> Hi Ian, we’ve just published an extensive blog post about how to achieve  
> this kind of hotlinking protection against Google Images:

just curious…unless I missed it in the article…how are you adding  
the  
GET param for visitors, but not for bots?

---

<div class="post-metadata">

**Author:** ![peterpiper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3e96dc/32.png) [@peterpiper](https://www.ruby-forum.com/u/peterpiper)\
**Post date:** [February 24, 2013, 3:42am UTC](https://www.ruby-forum.com/t/updated-hotlink-protection-with-new-google-image-search/229496/5 "2013-02-24T03:42:46Z")

</div>

for those using wordpress, WP-PICShield can be helpful, do almost  
everything you want or not 🙂

- Pass-Through Images Request
- Caching Support,
- Custom image transprency
- Anti-IFRAME Protection,
- Custom PNG watermark
- HostName over images as url and/or in QR-BarCode !!!
- Protection against unauthorized requests
- Redirect direct-link to: attachment, single/gallery, or home
- Allow Online Translators
- Avoid memory errors for big files
- Allow share button for socials sites:Facebook, Pinterest, Thumblr,  
Twitter, Google Plus
- Allow Wordpress via RPC and Twitter via OAuth
- Allow remote ip list
- Manual Clear Cache script avoid php limit execution
- CDN Tools and helps !!!

unfortunately only httacces rules , not nginx.
