Hotlinking
Posted on May 12, 2007
5 Comments
Caution: I'm experimenting with various hotlink protection methods. If your feed reader isn't showing images, please let me know!
Hotlinking is that nefarious habit of linking other people's content directly into your own pages. In other words, the image displayed on your page, but still hosted on someone elses server. That someone else gets soaked for the bandwidth of the image while you show it.
It annoys the crap out of me. Especially as a lot of spam blogs (aka splogs) will copy entire posts from feeds and hotlink the images from me.
With help from Whoo, another WordPress support volunteer, I have a simple little .htaccess file that I can use to prevent individual cases. It works well, but becomes a bit labor intensive as I go after more sites. I just drop this into the wp-content/uploads/ appropriate image directory of the targetted file:
-
RewriteEngine On
-
RewriteCond %{REQUEST_FILENAME} \.(gif|jpeg|jpg|swf)$ [NC]
-
RewriteCond %{HTTP_REFERER} sploggers-domain-fragment\. [NC]
-
RewriteRule (.*) http://www.solo-technology.com/images/hotlinkthief.png
Try and hotlink a picture in that particular directory, from the targetted domain, and get the picture at http://www.solo-technology.com/images/hotlinkthief.png instead.
Today I'll be playing with the Hotlink Protection Plugin. I'm still reviewing the code, trying to figure out how it does the magic... but I'll turn it on too. Here are the particulars:
How it works:
Referrer check if someone requests an image from your blog.
If the referrer is not empty and not your blog the request is redirected to an information image
The image urls in the feed are replaced by an alternate url. This url is not protected by a referrer check so online feedreaders get the imageWhat it not does:
It doesn’t protect the images in the feed. So hotlinking the image urls from the feed is possible. But in my opinion it is nearly impossible to protect this images without breaking some online feedreaders.
It doesn’t prevent someone from downloading your images and placing them on their own webspace
Stay tuned...
[Update] Seems like adding an image to this post would help testing that plugin... So, here's the image mentioned earlier that one site has displayed prominently
Tags: blog, hotlink, plugin, splog, WordPress
Possibly Related Posts
Comments
5 Responses to “Hotlinking”
Leave a Reply



I like the idea to some extent, but it seems to me a lot of bloggers will get lazy and depend on other people’s content instead of creating their own voice.
Cade - that has definitely already happened.
But I’m not sure how that applies to the concept of hotlinking or hotlink protection.
I’m late to the party here but I’m wondering if you got the plugin to work, since I’ve been looking for a similar solution. I installed the plugin as well and apparently what it does (when it works is change the URL access to something like http://blah/index.php?feedimage=wp-content/uploads
My desktop newsreader picks it up just fine, but Google and Bloglines show the hotlinked image instead. Tis a shame.
I ran into similar issues.
It’s something I’d still like to tackle or resolve someday, just on the back burner for the moment.
In the meantime I added the most prominent newsreaders into my htaccess file (Google and Bloglines), so that should allow a few legitimate requests for the images.