Hotlinking

calendar Posted on May 12, 2007   comments 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:

CODE:
  1. RewriteEngine On
  2. RewriteCond %{REQUEST_FILENAME} \.(gif|jpeg|jpg|swf)$ [NC]
  3. RewriteCond %{HTTP_REFERER} sploggers-domain-fragment\. [NC]
  4. 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 image

What 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 ;-)

Don’t be a hotlinker

tags Tags: , , , ,

Related Posts Possibly Related Posts

Comments

5 Responses to “Hotlinking”

  1. Cade on May 14th, 2007 12:14 am

    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.

  2. Chris on May 14th, 2007 7:31 am

    Cade - that has definitely already happened.

    But I’m not sure how that applies to the concept of hotlinking or hotlink protection.

  3. Lincoln on June 16th, 2007 10:57 pm

    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. :(

  4. Chris on June 17th, 2007 7:16 am

    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.

  5. Lincoln on June 17th, 2007 3:12 pm

    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. :D

Leave a Reply




Have you read the Comments section on the Disclaimer page?

About

Wandering the Internet, looking at all things bright and shiny. Playing with many, writing about some. More …

Recent Posts

Recent Comments: