How to stop hotlinking?! HELP
  • Hey guys

    I know that some of you have figured out a way to stop hotlinking of your .mp3 files. I need to do that! One file in particular is being hotlinked the fuck out -- an average of 15GIGABYTES A DAY. Needless to say, I need this to stop asap!

    I know that its some sort of mod rewrite on the .htaccess file. But I run wordpress on my server. Unfortunately I suck at .htaccess files, so any tips would be GREAT!

    I don't use cPanel (I'm hosted at mediatemple.net if that helps any?); I think cPanel has a one-two-click feature to stop hotlinking -- I cant find ANY hotlinking articles on MediaTemple's support files. So I'm stuck with the old fashioned way.

    Any help is appreciated! Thanks!
  • The excellent Loudersoft posted this a little while ago when this came up:



    You need to configure the .htaccess file in your music directory to send nasty hotlinkers to the redirect.  Here's that code, fix as need be --



    RewriteEngine on

    RewriteCond %{HTTP_REFERER} !^$

    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourwebsite.com(/)?.*$     [NC]

    RewriteCond %{HTTP_REFERER} !^http://(www\.)?someotherwebsitethatcanhotlinktoyou.org(/)?.*$     [NC]

    RewriteRule .*\.(gif|jpg|jpeg|bmp|mp3)$ http://yourwebsite.com/redirect.html [R,NC]
    Just copy and paste that into a text file, renaming the URLs as appropriate, and then drop the file into the directory where you keep your mp3s.  Then change the file's name, including the file extension to .htaccess and you're sorted.  I redirect people to a special redirect page that explains why they're there and hopefully might even tempt some of them to read my site.  That way I stand half a chance of getting something out of the whole thing.



    http://songbytoad.com/2007/06/24/redirect/
  • you're magical.

    I see that you use wordpress. I upload my files via wordpress, so I would just add it to the wp-content/uploads folder, right
  • uh oh... I created the .htaccess file with this in it:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?prettymuchamazing.com(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mossipblog.com(/)?.*$ [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp|mp3)$ http://prettymuchamazing.com/about/hotlinking-isnt-nice-dude/ [R,NC]


    and uploaded to my wp-content/uploads directory and now all my hosted files are giving me 500 Internal Server Errors.


    I've cleared my cache a few times to make sure, error persists. What did I do wrong?

    PS: I deleted the .htaccess so my images/mp3s can work, but i still want to stop mp3 hotlinking

  • Hmm, no idea.  Unfortunately I know fuck all about coding, but I basically did what you did, as far as I remember, and it worked for me.  Does the Wordpress uploads folder have subdirectories in it, because that might be the problem, but that's just a wild guess. 



    I love the redirect page - that picture is hilarious.
  • it's too ironic that the # 1 pirate blog on the net is complaining about someone stealing his bandwidth
  • Hmm I should experiment with the code and just have all the hotlinking mp3s re-direct to my front page. Probably would increase traffic.
  • Luis,  did you just create an .htaccess file? If not, paste Loudersoft's code into the original .htaccess that is either in your root directory or /wordpress directory (if you named it something else). Your htaccess needs to have its original contents and the new file overrides it which is probably causing the error.
  • it's too ironic that the # 1 pirate blog on the net is complaining about someone stealing his bandwidth

    uhh... anyway...??


    Does the Wordpress uploads folder have subdirectories in it, because that might be the problem, but that's just a wild guess.

    it does! its split up by year "2007," "2008," yadda yadda.

    Luis, did you just create an .htaccess file? If not, paste Loudersoft's code into the original .htaccess that is either in your root directory or /wordpress directory (if you named it something else). Your htaccess needs to have its original contents and the new file overrides it which is probably causing the error.

    well Wordpress creates an .htaccess file onto the wordpress directory (in my case root dir) automatically... so what you're saying is that I have to add the contents of that .htaccess file into my other .htaccessfile in my mp3 directory?

    thanks for the tips, I will give them all a try and see what works!


  • Hmm I should experiment with the code and just have all the hotlinking mp3s re-direct to my front page. Probably would increase traffic.


    thats genius! hahaha
  • It's very possible to do what Allan is describing.

    I'm trying to find my htaccess file but since I run about 15 domains on my server and they all run off of one htaccess file I can't remember where it is...
  • Hey Luis, I found a htacess generator.... much easier then poking around my server and then reading the code:)

    http://www.htmlbasix.com/disablehotlinking.shtml
  • thanks guys! I finally said, "screw it," and went to a (wordpress only) higher power. works like a charm.
  • you could also make it re-direct to rick astley. Or an mp3 of porn noises...
  • this has nothing to do with coding, but one way we got kids to stop hotlinking old pictures was by replacing them with graphics that said, "JESUS LOVE YOU!!!!" then replacing the pics in the original posts with new ones with different names.
  • haha.. OR you can do the coding, and it could do all that for you
  • I vote for a special 404 featuring tubgirl, pain.jpg and goatse man all in rotation
  • Hmm I don't want to be the guy who makes that. How about I nominate you loudersoft to do that for us? :P
  • I am unable to accept this nomination
  • You'd end up on all sorts of FBI lists, so best not!
  • The breakfast-lunch-n-dinner guy who's currently top of the Elbows rankings is hotlinking all his mp3s, including one of mine that I've since removed. This doesn't seem right to me.

    I'd post his link so you can go check if you're also been hotlinked, but I don't really wanna be responsible for giving him any more traffic than he's already getting so you'll have to make your own way there!

    I'm going to give this Wordpress stuff a go later on when it's not 10pm and hours after I've turned my brain off for the night, but for the moment I've settled for a slightly sarcastic comment on his site and the deletion of the mp3 on my site - although for some reason it's still working on his. Ah, I give up.

    What's your method for dealing with these idiots?

    *edited for typos
  • I tend to go down the emailing them route, then if there is no response redirecting traffic (301 redirect) if the mp3 is getting hammered. If its just a couple of downloads I tend to not care so much though.

    But being top ranked on Elbows for hotlinking other's images and mp3s with no commentary is a bit bad though. Not much of a music blog there really at all.
  • Consider me a douchebag, but I hate his website. \-:
  • I can't even talk about that kid, he infuriates me too much. Agnes and I discussed this earlier, but several months ago he completely stole our content, NOT just mp3s (though, of course, he hotlinked the mp3s as well).



    I usually don't care so much about hotlinking because it happens far too often and when you have your own host you're setting yourself up for it but when someone steals your actual post content it's another story. The ones I hate most with hotlinking are those that hotlink and get/are popular. That would include any blog that does it on HypeM - they get traffic from other people's files, literally straight up. And then of course those that become the most popular on elbows because of it. 



    That being said, I know I sound like a ranter at the moment but I honestly don't usually care. Happens too many times to invest much into it.
  • You're more than welcome to use my little visual of Lorena Bobbit as your re-direct page if it helps you get through the day :) I'm not sure I've been able to get my re-direct to work, however.



    grrrr...... well, this takes all the fun out of it... but if the link won't work, fine, ......  http://www.loveshackbaby.net/dont-fucking-link-to-my-fucking-mp3s-or-ill-cut-your-cock-right-the-fuck-off/



    seriously.... if anyone can also tell me why I get a javascript void error every time I try to embed a link with windows 7 and firefox I'd be just *this* much closer to not picking up the knife today, thanks
  • Tart, not sure if you're trying to make that a page that shows up at your top menu, but I'm going to go out on a limb and say that's not what you're aiming for?
  • Tart, what about the cockless mp3 thieves out there?
  • Oh no, I don't mind having it up there. And Sean, some of them are just metaphors, alas.
  • Maybe you can enlist the Web Sheriff to crack down on him.
  • "But being top ranked on Elbows for hotlinking other's images and mp3s with no commentary is a bit bad though. Not much of a music blog there really at all."

    Exactly! I'm not self-hosted so it doesn't affect me really in that sense, but it still pisses me off that he's hotlinking AND doing it with no content whatsoever.

    My favourite part of his site is where he thanks everyone he's hotlinked for "letting us jack their mp3s". I don't recall "letting him" do anything!

    Dick.
  • this one was interesting:

    http://music.minneapolisfuckingrocks.com/post/384393212/mp3-rogue-wave-solitary-gun

    "MP3 link" is to hype machine.
    The stream is linked to me (with credit).
    And the mini-write up is on how to get the mp3 free.

    Mixed feelings... I appreciate the "holler", but I think MFR is a good size blog, meaning that's a lot of potential streaming off my server.
  • If anyone needs any help with guerilla htaccess/deeplink wars, you're welcome to email me privately and I can help you set something up.
  • I wonder if that Downplayer actually conducts any of the interviews/reviews or if those are stolen as well? Also interesting that the 'contact' box mentions sending them music or advertising on the blog, but nothing about complaints/removals. 
  • yeah, I almost went to the point of tracking down the names of people who did the interview/reviews to see if they just yanked those from somewhere else too.  I fucking hate music blogs like that, serious crappage.
  • Looks like they removed my link after I complained. That sucks for the artist.
  • I found two people who were hotlinking pictures from remixthevideo.  I changed the pictures to tubgirl and now I feel kind of bad.  Only kind of.
  • shit why did I google that
  • ahahahah
  • Ooh I'm glad this thread got re-upped, I've been having some hotlinking trouble.

    Does anyone know how you can trace hotlinking if you have a box.net account rather than host the mp3s directly on your server? (Other than paying for the 'business' version of box, which does let you view access data.)

    I have some mp3s that have insane amounts of downloads.  I'd like to think I was just that popular, but I'm not seeing the traffic.  The trouble is, since it's hosted on a third party site, people can just steal that URL, embed it, and I never see any kind of traffic reflected in it on my site stat meter.  Does anyone have any internet hacky way that I can find out who's stolen my link?  Or do I just have to upgrade my box (or start hosting on my server) if I want to catch the dickheads?  
  • For me, I actually discovered people hotlinking my groovebat urls through looking at my referrals on the Woopra dashboard (http://www.woopra.com/ ) I had a couple of referrals show up from blogs I've never seen in my life so I checked them out and turns out they were hotlinking few files, so maybe that might help.
  • @LOOSE L!IPS
    I take it you've tried gooling the exact URL to the mp3? ie. http://box.net.....

    PS - the first mixtape I ever downloaded from a blog was entitled "Loose Hips Sinks Ships". It was amazing.
  • I'm wondering about this, too -- I recently switched from Apache to nginx & the rule-making is entirely different.

    Anyone know anything about nginx?
  • tim: yeah that doesn't work. :(
    i might just be stuck.

    and dang i guess i have a lot to live up to. 

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!