Bandwidth theft occurs when others hotlink to files directly on your site, when you do not want them to. A common occurance for this is linking to your images, sound, or pdf files, as an example.
A common example is web forums. Most forums allow you to host avatars (these are small images that users can associate to their nicknames) directly on your website. When you do this, what's to stop the user from using the avatar on your server on other web forums?
How can I stop bandwidth theft?
Fortunately, you can use a .htaccess file to do this. Copy the example below into the directory where your images/documents are:
SetEnvIfNoCase Referer "^https?://(www\.)?example.com/" ok=1 SetEnvIfNoCase Referer "^$" ok=1 <FilesMatch "\.(gif|png|jpe?g)$"> order allow,deny allow from env=ok </FilesMatch>
All you need to do is change two things:
1. Change the 'example.com' above to your domain. Do not remove anything else though! The (www\.)? makes the www part optional in your domain name. As it is in the example, www.example.com and example.com will be allowed access. 2. Change the <FilesMatch "\.(gif|png|jpe?g)$"> if necessary. In the example, 3 common graphic formats are caught (note that both jpg and jpeg are caught.) As an example to add pdf files to the restriction use <FilesMatch "\.(gif|png|jpe?g|pdf)$">.
Save your .htaccess and it should work. The images will appear as a broken link in browsers.
Note: This will not stop someone from directly typing the URL in a browser! It has to be a link pointing to your website from another domain!