Sign up with your email address to be the first to know about new products, VIP offers, blog features & more.

Hotlinking mp3 files

By Posted on 1 No tags 0

Just noticed that my blog was eating +1GB bandwidth per day, and after consulting the logs, guess what? and some other bastards 🙂 are hotlinking all my mp3’s. All that because of THIS! That’s what happens when you leave your folders opened for access. They are scanning folders for mp3’s and then indexing the content.

Are you dealing with the same shit?
You can block this simply trough .htaccess. Take mine for example:

[pastacode provider=”manual” lang=”markup” message=”htaccess mp3 files hotlinking protector”]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteRule .*\.(mp3|wav|avi|flv|zip|rar)$ - [F,NC,L]

Replace wav|avi|flv|etc to match your needs, or just simply delete them and leave (mp3) to only protect mp3 files.
This technique protects also the “right click save as” issue. Apparently, some old htaccess snippets would prevent the hotlinking but when right clicking and saving as.. the protection was bypassed.

Hotlinking mp3 protection

If anyone wants to test my protection, go here:
They were hotlinking this from me:
At this moment, on that mp3skull page, my hotlink was displayed second on the list. Mouse hover the green download menu from the second result and see if it matches my url and test it out! However, I believe that by the time you’ll see this, my hotlink would be gone from their site.
Well, this is the only hotlinking mp3 files protection technique that works at this moment.
Good luck!

What do you think?

Your email address will not be published. Required fields are marked *