How I stopped a bandwidth thief

As you may have read, a few days ago I found that I was having a few issues with bandwidth theft with people hotlinking to images on my auto blog without permission. I decided I'd have some fun for a couple of days by replacing the hotlinked images with some non-auto, border line inappropriate, images.

Yesterday I decided I'd had enough fun and started doing some research into how to prevent hotlinking through editing the htaccess file. I "google'd", asked questions of people smarter than me, and scratched my head. All the usual stuff. I'd became quite partial to one of my bandwidth thief banners, and wanted to implement a solution that would incorporate the banner somehow.

The solution I settled on (see code below), was to block requests for images from outside sources, and serve up the banner of my choice in place of the actual request.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?domainName\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/bandwidthThief.jpe [L]

In other words, if anyone attempts to hotlink to any images (jpg, gif, bmp, or png) on my server, instead of displaying the requested image, they will instead display my banner of choice.

Simplifying it further, the bandwidth thief thinks they are getting an image of a Subaru WRX STi, but are instead served up a massive set of bulls testicles (see below). I love the internet. If you want to use the "Bull Balls" solution, feel free to copy the image below (NO HOTLINKING!!) :p A link back would be appreciated.

Band Width Thief

1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 4.56 out of 5)
Tweet This!
Bookmark and Share

24 Responses to “How I stopped a bandwidth thief”

  1. swollenpickles says:

    “Inline linking is the placing of a linked object, often an image, from one site into a web page belonging to a second site. The second site is said to have an inline link to the site where the object is located. Inline linking is also known as hotlinking, leeching, direct linking or bandwidth theft.”

  2. Angela says:

    I have so much fun messing with hotlinkers, sometimes I almost enjoy it when they steal my bandwidth.

    Here’s a fun one I had for a Denver Broncos fan who was trashing my beloved Patriots while hotlinking to one of my images.


  3. swollenpickles says:

    Haha, I don’t know much about the NFL but I like the sentiment! :p

  4. Pete White says:

    ROFL I think people will get the idea not to link to your images pretty quickly!

    Have you found you are using less bandwidth now?


  5. Hi Pete
    It’s a bit early to see a difference in bandwidth but I’ll keep an eye on it. If I notice anything cool I’ll post it.

  6. Rob says:

    Nice idea that with the script. I had some problems in the past and had some fun changing the images… but its time consuming :-(
    My host has the option of hotlink protection so i have no much troubles.

  7. WarriorBlog says:

    LOL I never would think of that, very nice idea… That being learned, I kinda want them to use my picture :-)

  8. Adam says:

    So what are the effects on your site? Does it result in slower load times of your pages?

    The bull balls is too funny.

  9. swollenpickles says:

    Previously the effects were that other sites were hotlinking directly to some of the car images hosted on my site. The pics were between 40 and 100kb each. So if they hotlink to a few images, they could be stealing 1mb of bandwidth at a time.

    So now, instead of getting the car images, they get the balls (which is about 7kb). I could have blocked images altogether, but for the time being I’d rather serve them up the balls.

  10. Susan Suarez says:

    Oh my…that picture popped out of nowhere! haha

  11. […] Step 4. Create your own banner ad, place it on your site, using your affiliate link. If you’re too lazy to create your own, feel free to download the one I slapped together (see right) and use it on your site. Please don’t try hot linking, otherwise I’ll have to give you the balls! […]

  12. casemods says:

    That’s why you use image shack 😉

  13. I had to stop using this method recently once I realised I was serving the balls to my RSS feed. If anyone knows of an alternative, please let me know.

  14. Jason says:

    awesome cal dude, i must read your blog more often! bandwith theives sometimes drain my BW big time, if they link on forums and stuff then it can get major traffic

  15. […] saw 24,770 unique Swollen Pickles visitors, up from 21,859 unique visitors in October. My “How I stopped a bandwidth thief” post was the most popular post for the month, closely followed by “Top 5 most […]

  16. James says:

    I adopted a slightly different approach although it is slightly more “manual”. Basically, I give a 403 (access denied) response to requests that come from domains I have detected as in-line linkers or hitting me with referrer spam. The write-up for Apache is here (shameless plug…sorry):

    I like your method with the balls image – that is too funny! Kudos to your admin l33t-ness 😉

  17. David Rader says:

    I couldn’t believe I hadn’t commented on this article… I was just looking at your highest rated posts and found this beauty. This article is how I found your website, through a search on google images… i thought it was so hilarious i clicked on it… well now it’s got an additional 5 star rating!

  18. Elisa says:

    So, if someone were to ask for permission, you’d say yes, despite the loss of about 1mb? I would like to be able to put 100% original content up when seeking out pics or something that adds some spice, yet find that it is nearly impossible as I am not a pro-photographer/artist/have access to fab programs to create pics, etc. So, if I want to add something cool, I seek out the internet’s help.

    I would like to think that people find it flattering at least in some way that I would use a pic that they took amongst the many others. Nonetheless, I had no idea this meant slowing down bandwidth access. Where is the happy medium?

  19. Elisa – If someone wants to use an image they could download it, and place it on their own server, and credit the source if appropriate. Use the image if you want, but just don’t hotlink it, host it from your own server.

    It’s not an issue of using images, its an issue of someone using up bandwidth that I’m paying for.

  20. […] “How I Stopped a Bandwidth Thief“ […]

  21. […] As another part of the celebration of six months of existence, we present to you the Aussie Bloggers button collection, suitable for posting on your own site, but remember that you should host it on your own site, as displaying the images as hosted on here is considered hotlinking, and you might wind up facing a surprise. […]

  22. this is so funny, I might consider doing this to people who try to link to images on my site. I get them from Google, so can everyone else..

  23. 4little1s says:

    Yeah just discovered we had this issue with one of our pictures and someone else pinching it and saping our bandwith.

Leave a Reply

Most commented posts

Highest rated posts of all time

The Swollen Pickles Network