Recently, I’ve been working off-and-on redesigning this weblog. I’m tired of the look and it’s time for something new. While I’ve been thinking on how the site should look, I’ve also been thinking about how to make it function better. MovableType has evolved since I started this blog and my knowledge of how it all works has expanded as well. Additionally, there are a few pet peeves and tweaks that I’ve been wanting to enable or change as well. The first of these I enabled today – not more hotlinking. 🙂
Hotlinking is where someone uses images hosted on your web server on their own pages. Most people do this without knowing that they’re doing anything wrong per se, but as more and more people embed my images in their forum profiles and what not, I’m noticing my bandwidth increasing more-and-more. The rub I have with hotlinking is the fact that although my traffic has increased, no one is truly visiting this web site.
To fix this problem, I came across a wonderful article Preventing image hotlinking: An improved tutorial, by Tom Sherman that fit the bill nicely. By simply editing my .htaccess file and creating a re-direct page, I’ve killed all hotlinking in a very elegant manner.
If someone hotlinks an image and it’s not from my approved list of sites, such as Bloglines, Google Images, etc., then the user will see a broken image. If they link directly to an image, then the user will see a nicely formatted page like this. All-in-all, it was a pretty simple fix to make and I’m surprised that I haven’t enabled this protection sooner.
What was surprising though is that as soon as I enabled this new fix, I was bombarded with error reports in my inbox. I had expected this, but not to the degree in which they came. In the space of about 10 minutes, I had 1000 e-mails in my box showing me all the details of where my images were being hotlinked from. Needless to say, I had to turn off the e-mail of my error messages, but it does show what a problem hotlinking had become.
Oh and for those of you thinking of implementing something like this on your site, but don’t like the .shtml method, there’s a great PHP solution on A List Apart, that basically does the same thing. The article is called Hey! That’s mine! and is worth a read.