Neil Turner's Blog

Blogging about technology and randomness since 2002

MySpace users are bandwidth thieves

Well, some of them are. I keep finding images hotlinked from my site in their profiles and blog postings.

It’s easily fixed with a bit of code in the .htaccess file, specifically:

RewriteRule .* - [F]
RewriteCond %{HTTP_REFERER} ^http://profile\.myspace\.com [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ /uploads/stealbandwidth.png [L]

This means that anyone browsing MySpace will now see this image instead of what they wanted. It shouldn’t affect any other sites. If they really want to have the images up, then they can download them and upload them somewhere else.

PS: Shame on all of you for not pointing out the grammatical error in the title (now corrected)


  1. I’ve got quite a few of them as well, but I also get hit by quite often. At least Beepworld seems to have stopped after I sent the policeman round a couple of times.

  2. What image were they stealing?

  3. I get the same from MySpace, Xanga, LiveJournal and basically any other free hosted blog system and unfortunately I’m on a Windows box, so .htaccess isnt really well implemented

  4. Once I read your entry, I decided to have a quick look at my server logs, and noticed a few sites leeching images off me too.
    I have a gallery site, mostly filled with my own holiday snaps but also many random images I’ve come across on the web that I might want to post elsewhere – since I’m not a bandwidth thief I copy them to my own server and use my bandwidth instead of leeching off another’s. It would be nice if others had the same courtesy!
    I’m working on a script (since I don’t have any access to .htaccess grr!) that will redirect a 404 for a particular image to another like you’ve done here.

  5. I havent had any leaching from them, but I did notice a couple of livejournal related things, which were searching recent blog posts on there for posts which contain images, then linking to the posts. If I was to block Livejournal users viewing images, it would mess up me being able to post on both there, and my website, So I doubt I’ll bother. But its certainly something to look out for

  6. That is so cool. Thanks for writing that code. I’m gonna include it in my .htaccess file right now.
    So do I stick the image in a folder called “uploads”?

  7. Where in the .htaccess file does it go?

  8. Anywhere you like that’s not already commented out, Joe. You can make the target URL anywhere you like.
    For instance, you could point it to Neil’s “I Steal Bandwidth” image if you like! Er, wait a minute… πŸ™‚
    Thanks for making it cut-and-paste easy, Neil!

  9. I still don’t know where to put it. How can you tell if something has been commented out?

  10. Joe, are you familiar with .htaccess? You might try here or here or here for tutorials.

  11. Thanks. I found the following here that shows how to block all hotlinking:
    Serving alternate content when hot linking is detected
    You can set up your .htaccess file to actually serve up different content when hot linking occurs. This is more commonly done with images, such as serving up an I Steal Bandwidth image in place of the hot linked one. The code for this is:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www.)?*$ [NC]
    RewriteRule .(jpe?g|gif|bmp|png)$ [R,L]

    Same deal- replace with your own, plus angryman.gif.

  12. Right, except in this case you would want to borrow Neil’s second line.

  13. Actually, I like it the way it is because it blocks hotlinks from any domain other than my own, even Google images.

  14. Neil, can I steal your ‘I Steal Bandwidth’ Image? πŸ˜‰

  15. Dave: If you save it to your own server, yes πŸ™‚ . It’s not the copyright thing that I’m worried about, more the bandwidth.

  16. I had a similar problem with an image on my server, but it was due to a friend hotlinking directly from a very popular, adult blog. I ended eating through nearly 4 Gigs of bandwidth in four days due to people then hotlinking to it on their own sites.
    Cheers πŸ˜‰
    I had to delete it then upload the image onto Imageshack. It wasn’t even one of mine but something someone sent me in my work email:
    I’ve since used a few .htaccess entries to block linking from certain sites. I used the tute here:

  17. I Steal Bandwidth

    So Heather, when you finally figure out that your profile page sucks and remove this hilarious background, here’s a little lesson that will help you how to use bandwidth properly: save the picture to your desktop or some other location first, the…

  18. I heard it won’t be that way with the new myspace site. Rumor has it that myspace is coming out with a better version of there site on another domain name starting march 1st it will be another social networking community site with alot more features. I guess to stay ahead of other sites coming out like also i heard it will be called i guess well just have to see if friendwise happens.

  19. I got interested in this “bandwidth is not free” as was looking up musician Michael Franti on His profile seemed weird to me b/c it had the quote sprawled all over the place and looked unusual compared to other profiles. I wasn’t sure if he was doing it to make a statement about myspeace, or if someone else actually did that to his space on myspace. suggestions?

  20. Interesting you should ask, Jena. It’s actually a combination of both.
    First of all, nobody defaced Michael Franti’s MySpace page. The only person who edited his MySpace page is himself.
    However, when he created his page, he stole graphics from somebody else. Instead of opening a Photobucket account to host the pictures himself, he stole them. So the person who owned the photos, changed them into something else. Now everybody who views Michael Franti’s page knows that he stole the pictures.
    That’s all there is to it, really. Because he stole the pictures, it’s the pictures’ owner’s prerogative to change them.

  21. So if you had a myspace, and you had images that people had been stealing, and it had nothing to do with bandwidth, just that I didn’t want people taking my images, where would I put this code?

  22. Same as Neil mentioned in the original entry, Bri! πŸ™‚
    You could maybe make your own picture that explained why you didn’t want people stealing the images, and use that.

  23. Someone stole my MySpace Background and put a ‘I Steal Bandwidth’ background on my site! I did not steal any images etc and want this background removed! I cant seem to eliminate this background and import my original background on my MySpace webpage.
    How do I fix this problem?

  24. Eric: Nobody can touch your MySpace page. If your background has suddenly changed, it is because you were hotlinking.

  25. What you probably did was ‘hotlink’ the image. If you found an image on the net that you liked, and then just added the URL to your Myspace profile, then that’s called hotlinking. It’s also stealing someone else’s bandwidth, as every time someone views your profile their web browser also loads an image off someone’s web site which uses up some of their bandwidth allowance.
    What you need to do to fix the problem is this:
    1. Find the original image that you wanted to use
    2. Download the image to your computer
    3. Go to a web site like ImageShack and create an account, then upload the image there
    4. Use the code that ImageShack gives you to paste the image
    This still may not work, so you may need to buy your own web space for this.

  26. this is good information! A lot of myspace users are probably not aware that hotlinking uses bandwidth from the sites they hotlink from. It would be nice to have this information available to them when they start an account. I know that I would not intentionally steal bandwidth from anyone πŸ™‚ The only reason I haven’t is totally selfish – I want control of the image, so I download and then upload so it doeasn’t change or disappear. I had no idea. Thanks for the info!

  27. thanks! MySpace users had pulled over 500megs from my site in just the past week!

  28. Proud to say I don’t steal images. In fact, my page is pretty damn plain.

  29. for the love of god, someone tell me how to stop hotlinking of wmv and mp3 files. Those myspace leechers are draining my bandwidth!

  30. did you write to the creators of family guy before you ‘stole’ their drawings ?
    here’s what you do>
    get a pen and paper and draw your own cartoon, then color it and repeat as required.

  31. I just think myspace users really don’t have the knowledge of how to change the code or even want to try they just want the easy way.

  32. How do i get a thing that pops up when someone is trying to steal one of my images…because i had the original $hit, then everyone started coping them so i deleted everything on my page and i am starting all over again and i wanted this code so no one could take them away from me… can anyone help me? i would really appreciate it…thanx

  33. its not them man, its the premade profile sites… all the myspacers are doing is getting code from them… sheehs!

  34. Mentioned thing is actual not for myspace only, all free image hosting sites helps to ‘steal bandwidth’ too..

  35. To the above poster: No, free image hosting sites *deflect* bandwidth stealing.

  36. Rumor has it that is coming out with a better version august 20th

  37. I just think myspace users really don’t have the knowledge of how to change the code or even want to try they just want the easy way…

  38. Neil, fantastic script! MySpace has been draining my resources for months, not anymore. The only problem I have is the “steal bandwidth” image does not appear instead of the image they are linking to, but hey!
    Thanks again.
    I have given you a thumbs up at StumbleUpon.

  39. i have hotlinking protection on my site and its working fine.
    problem is even though no images are being shown in the myspace page, the requests are still coming and its still taking bandwidth – so it seems i cant actually win.
    I have unlimited bandwidth but its the principle that pisses me off.
    also my replacement image never seems to actually appear – is this because i turned off direct requests allowed?