A painting of me

Hot Linking

   8 August 2005, late at night

”[Hot linking] is the placing of a linked object, often an image, from one site in a page belonging to a second site”. When someone links to an image I post here for the purposes of using the content on their own site, they are essentially stealing my bandwidth, since it is 1&1’s web servers that are serving up the image, not their own. Nevermind the fact that people shouldn’t be using my photographs without my permission—especially on ugly-ass web sites.

So how do you stop someone from linking to your content like that? Well, if the site that hosts your web site lets you use .htaccess files, you do so with the following snippet of code I found at the comprehensive guide to .htaccess.

  1. RewriteEngine on
  2. RewriteCond %{HTTP_REFERER} !^$
  3. RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
  4. RewriteRule \.(gif|jpg|js|css)$ - [F]
  5. Download this code: /static/code/10.txt

That should refuse access to your images from pages that aren’t hosted on your own site. (That said, if people notice anything broken here, please let me know!)

Some of the people at myspace.com need to learn some internet manners.

|  

Comments

  1. A common problem for all. Esp. the internet riff raff, (like myself) that don’t have their own hosts. It’s quite a time consuming process to go looking for picture hosting (compared to how much easier it’s just to type in a picture link). Yahoo photos and a lot of other sites already stop hot linking. (Too bad I selected Yahoo Photo for my pictures, it’s not very useful. But at least it’s available without visitors having to sign-up or sign-in.)

    Good for you in stopping it though. I only really want to link my own pictures, so I can see how it could be a bother (if you were paying for bandwidth, or worried about running out) when people just keep linking random things on other peoples sites.

  2. ya, i had the same problem with the mp3s on my blog. I did the same thing, just re-directed to my main page.

Don't be shy, you can comment too!

 
Some things to keep in mind: You can style comments using Textile. In particular, *text* will get turned into text and _text_ will get turned into text. You can post a link using the command "linktext":link, so something like "google":http://www.google.com will get turned in to google. I may erase off-topic comments, or edit poorly formatted comments; I do this very rarely.