Google cache shows broken images but Google Images is fine - site is running great

hi,

My site runs great on Cloudflare, superfast, however i noticed that when checking it on google cache, all images, (jpeg, png, etc) all appear broken - not a huge deal but was wondering if it can be fixed.

Additionally, I have hotlink protection on my .htaccess and i don’t think i configured anything particular for Google’s crawler etc. it crawls the site very fast when i publish something new, nothing weird in robots.

Here we were discussing Google not updating my favicon, another user posted the full url to the favicon from my site (which works 100%) but when you click on it from google forum you get this:

That is the hotlink protection right? But is that due to my .htaccess + cloudflare or cloudflare alone only? And is it the same reason for which Google cache images appear all broken yes?

Site ranks well in Google and everything but would be cool to see the proper images on Google cache as well.

thanks,
Gabrio

Hotlink protection will not allow Googlebot to fetch your images because it will only allow requests with a referrer from your site (which Googlebot does not include.)

Hotlink protection has no impact on crawling, but it will prevent the images from being displayed on sites such as Google images, Pinterest, etc. Understanding Cloudflare Hotlink Protection · Cloudflare Support docs

Yes. It explicitly says so in the error message.

No. If hotlink protection blocks an image, .htaccess is never involved, as the request is not passed on to your origin server.

That’s right.

You could try turning off Hotlink Protection, and crafting your own WAF Custom Rule to block requests to images that are not from Known Bots and do not carry a referrer from your own website.

Thanks for the view, i’ve discovered something interesting.

There’s the “Scrape Shield” setting in Cloudflare, which then has a setting Hotlink protection.

With that OFF, when i click the former link from Google Forum, now i get this

So it’s still being blocked.

And i just commented out all hotlink lines in the .htaccess + CF on development mode (bypass) - which then tells me it’s something to do with the server conf or direct linking elsewhere, perhaps the httpd.conf

didn’t even know CF had that setting…

thanks,
Gabrio

1 Like