Website Design Blog of Alfred Fox
How To Prevent Bandwidth Hijacking And Image Or File Hot Linking
A common problem people often run into is file hot linking. This is caused when someone links directly to an image or file on your site, using it, without actually hosting it themselves, and in essence, robbing you of your bandwidth. This can be very irritating as bandwidth can be expensive. Here's a couple ways to prevent this. In order to make this work, you will need access to your .htaccess file. If one does not exist, simply place one in the directory to prevent hot linking. (Apache web servers) 1. To allow everyone except those you choose to deny access to your files and or images. Obviously offendingDomain.tld would be the domain you wish to block from accessing.
2. To prevent everyone except your website and anyone you choose to allow try this. And yourDomain.tld would be your domain and aDomainYouAllow.tld would obviously be a domain you don't mind hot linking.
All in all, its pretty simple. Also very effective. If you are having problems making this work, make sure your using an Apache web server (usually on a *nix machine) and that you have permission to modify your .htaccess. Some hosting companies do not allow this. Give them a call, they should help.
Comments for How To Prevent Bandwidth Hijacking And Image Or File Hot Linking


Great post, I googled all over but didn't come up with anything that made this much sense. Thanks.