Hotlinking but allowing Google Images, Pinterest etc


#1

Good afternoon,

I would like to use the CF Hotlinking option in the Scrape Shield section but would still like to show up in Google Images, Pinterest etc. for my website Sneakerwijzer.

How can I do that?

Any help is appreciated.

Olaf


#2

I don’t know of an easy way to allow hot linking for just Google and Pinterest.

There may have been some workaround using Cloudflare Workers, but I can’t find it right now.


#3

Hi,

Thanks for your reaction though. Hope that someone has had the same and found a solution.

Best,
Olaf


#4

I don’t think this will be an issue. I have sites with hotlink protection on, and the photos still show up in google images. Any service that indexes images should use the http_referrer object to safely grab the image, then store an optimized copy on their own server.

Is your question conjecture or do you have an issue you can show us?

The first two images at google are yours.
https://www.google.com/search?q=sneaker+wijzer&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiFuqaB5pHaAhXDwFkKHRrXCTAQ_AUICygC&biw=1280&bih=1237


#5

Hi Jules,

Thanks for answering. It is just that Cloudflare itself says so, check http://prntscr.com/iyenvi

So I was looking for a way to prevent hotlinking without having the negative sideeffects on Google Images, Pinterest etc.

But I will test it first then with a different site. Hope you are right and they still show up.

Then I will activate it for sure.

Do you have an example where you have hotlinking set up and still end up in Google Images?

Greets,
Olaf


#6

In my very limited test, I went to images.google.com and typed in an image search for an organization I host. It returned tons of thumbnails from the .org website. Right-clicking the image shows me a data: URL, so it looks like Google is crawling the site and saving the thumbnails. So clicking on the Google thumbnail nets me a very large grainy blown up version of the thumbnail.

I guess my hotlink protection is working, since Google isn’t “serving” images from my .org website.


#7

I found the Workers script. I don’t know Javascript, but it can probably be tweaked to allow Google and Pinterest.

There are a couple of examples here as well:


#8

Yep, the built in hotlink protection option is very generic. If you need to tailor it in any way we recommend using a Worker. And if you have questions about setting up your Worker you can head over to community.cloudflare.com/workers.


#9

Sure: https://www.google.com/search?q=abovebeyondgaragedoors.com&source=lnms&tbm=isch#imgrc=WkE6LRMm08ehjM:


#10

Thx! I will definitely test is now.


#11

This topic was automatically closed after 14 days. New replies are no longer allowed.