Hotlinking but allowing Google Images, Pinterest etc


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.


How to do whitelist domain when i have enable hotlink protection

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.



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



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.


Hi Jules,

Thanks for answering. It is just that Cloudflare itself says so, check

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?



In my very limited test, I went to 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.


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:


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




Thx! I will definitely test is now.

closed #11

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