Test Hotlink Breaking Redirect

There is a practice known as hotlinking, that is to insert an image into a website without physically capturing the image within that website. Here is an example, a photo of Luisa and me from a few years ago. It has no particular significance, other than that it is on the web and thus can be hotlinked. This first version is part of this post and is not a hotlink. It is a copy.img_1952-l-k-20091229_150

I am part of a team that runs a website with a lot of images: https://www.featurepics.com, if you need some good images drop in and we will be happy to sell you the license you need to legitimately use the photo that will tell your story. However, some sites take advantage of our catalog of images for sale by using them directly from our site. Of course they are watermarked but for some purposes that doesn’t matter. Like all sites we pay for bandwidth so each time someone looks at one of our images from someone else's site it costs us money and saves the hotlinker about the same amount of money.

Scott Hanselman has a post about how to defeat image hotlinking for sites using IIS, which this site does. You can read all the details  at Blocking Image Hotlinking, Leeching and evil Sploggers with IIS Url Rewrite. The basic idea is to substitute an image for every image request that does not come from your site.

I will implement Scott’s suggestion at https://kallevig.org, and the image that follows should no longer look like the one above, rather it will be an image with the text “Hot linked from Kallevig.org”.

The one that follows is not copied to this blog, it is hotlinked from a site called https://kallevig.org.

If you see an image with text the redirect has worked. If you see an image of two people, the redirect is not working.

Following will test an image that does not exist on Kallevig.org:


It remains to be see if we will implement this fix broadly, but it is working here.

Edit on 5/31: Because the way the redirect works is to block specific referrers, in my case enermeter.com, when this came up in my blog reading software the image was not blocked. The referrer was no longer enermeter.com. This could have been solved with a whitelist rather than a blacklist. The whitelist would allow specific sites and block everyone else. Oh well, this was only a test.

30. May 2015 18:04 by Kal | Comments (0) | Permalink
Comments are closed


<<  April 2021  >>

View posts in large calendar

Month List