Welcome to WebmasterWorld Guest from 35.172.195.49

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Canonical Tag in HTTP Header with empty content

     
1:53 pm on Jun 27, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Nov 13, 2016
posts:1194
votes: 288


Hi

Millions (exaggerated) of sites are hot linking images from my sites, and for some reason, Google picks these sites with my images, at the Google Image Search, instead of my sites.

I am blocking hot linking, so these images are not showing to humans, but, since GoogleBot is indexing my images, with these sites, this is still driving traffic to them, and not me.

So I thought of something. What if, I change the URL of all my images, and instead of setting a 301 redirect from the old URL to the new one, I set a canonical tag in the HTTP header, and then an empty content.

So a hit to an old URL would just have the HTTP header :

Link: <new_image_url >; rel="canonical"

And no content.

My theory is that, images will stop showing (like when blocking hot links) , but GoogleBot will also stop indexing the old URL and instead will index the new ones, therefore removing hot linkers from the image SERP.

Of course, this would be only temporarily since hot linkers will, at some point start hot linking my new URL.

I don't know if my explanations are clear.
8:52 pm on June 27, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


That may work, let us know :)

I also did the anti-hotlinking replacement image with the same results as you're saying.

What I eventually did (do) is, one by one, I renamed my images, then replaced all those hot-linked images with a 1x1 clear gif (even if the image is a jpg) at the server, using the old file name. The downside is visitor browser caching.

Then I visited those offending pages using Chrome Desktop Browser to draw Googlebot-Images. After a couple weeks Google Image Search started dropping the hot-linked images from its index, and my new, renamed images started showing up & linked to my site again. Some took a lot longer and some never came back (yet.)

I found that most of these hot-linking sites duplicate their pages to new domains with ads. That's why they do it. They don't seem to manually check where the images came from, so the new 1x1 clear gifs aren't detected.
10:30 pm on June 27, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Dec 12, 2004
posts:662
votes: 15


Google doesn't use canonical header for images. You can however try meta refresh.
11:42 am on June 28, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Nov 13, 2016
posts:1194
votes: 288


Google doesn't use canonical header for images.

Oh, ok, thank you Levo !

So, I think I'll do it differently. I'll change my images URL, and as soon as a new URL is visited by GoogleBot (meaning Google found the Image on my site), I'll 404 the old URL of the associated image.

ps: I discovered that, during my long absence, Google is again sending traffic from the Image search, by removing the direct link to the image alone.
8:54 pm on July 1, 2018 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 30, 2000
posts:520
votes: 4


I feel your pain mate, my images have plummeted over the last year or so and as soon as someone hotlinks one of my 1000's of images that particular image seems to disappear completely. Does Google simply not care about image search? It is such a simple problem to fix, same with people actually taking the image and re-posting it. I mean they should serve up the image that has been in their index the longest in the case of duplicates and let the owners scrap it out through DMCA for the errors. They shouldn't even serve any pinterest images up at all for example.
9:28 pm on July 1, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Dimitri have you tried using this header?

X-Permitted-Cross-Domain-Policies: none
6:30 am on July 2, 2018 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Nov 13, 2016
posts:1194
votes: 288


Dimitri have you tried using this header?
X-Permitted-Cross-Domain-Policies: none

No, I didn't. I'll look at it. However, I am not sure that Googlebot minds most of server headers.

Thank you!