AdSense Secondary Domain

Monday, August 26, 2013

Why "Pinterest Could Not Fetch The Image"?..

It was one of biggest mysteries for me, but since Pinterest was launched and became popular, I was not able to get it working for my cooking website.

At some point I decided that it wasn't meant to be and gave up. And ever since then, I was answering something like "It doesn't work, and I don't know why :(" to every inquiry from my readers on how to pin my recipes.

How to Reproduce The Issue

This is how the issue looked to my readers. An interface to select image opens when I click on "pin" button:

There I can select an image and click "pin it" to receive an interface to describe a pin and select a board:

And then, after I click "Pin It", I am presented with "Whoops! Sorry we could not fetch the image." error:

Pinterest Uses for Fetching

I did a bit more digging and now I have an answer to the question which bothered me for couple of years: Pinterest can't fetch the image, despite the fact that it shows it to me, because I have access to my website closed to any host of / Amazon Cloud origin, and Pinterest seems to use services hosted on to fetch images (at least for some actions).

I did close access from while back to prevent getting click bombed on my AdSense ads, tons of invalid clicks seemed to come from visits from I never understood what was causing them, but denying access for everything of origin fixed the problem once and for all.

Or until I wanted to have my recipes pinnable by Pinterest...

How to Fix The Issue?

So if you have similar issue like me, I hope I can save you some time trying to figure out how to fix it, like I wish, someone did for me long ago.

Simpler solution is to allow access your website (that is not a case for me, but it might still work for you).

More elegant solution is to allow only pinterest services to access your website from all the traffic coming from If you used the following .htaccess deny rule to restrict that access:

order allow,deny
deny from
allow from all
Here is an example how you can correct it to allow pinterest traffic through while keeping the rest of out:
SetEnvIfNoCase Remote_Host "$" a_robot
SetEnvIfNoCase User-Agent "^Pinterest.*" !a_robot
order allow,deny
deny from env=a_robot
allow from all


Listed solution will only fix the issue with pinning pages, if the cause of it, as I said earlier, is restriction of traffic access to the website via .htaccess.

Even though mine case was a tricky one to figure out, it isn't the only one out there. There maybe some other reasons why pinterest doesn't do what it is supposed to. I will appreciate if you share yours findings.


  1. I tried all sorts of things with no success, but this worked. Copied it to the end of my .htaccess file
    Thanks a million! :)

  2. stupid question, but where do I post this code?

    1. It should go into .htaccess file in the root folder of your website.