![]() |
Bandwidth theft or "hotlinking" is direct linking to a website's files (images, video, etc.).An example would be displaying a JPEG image you found on someone else's web page so it will appear on your own site, journal, weblog, forum posting, etc.
Bandwidth refers to the amount of data transferred from a website to a user's computer. When you view a webpage, you are using that site's data transfer to display the files. Since webhosts charge based on the amount of data transferred, bandwidth is an issue. If a site is over it's monthly bandwidth, it's billed for the extra data or taken offline until the ownerof the site upgrades the account.
By preventing hotlinking on your site, other sites will not be able to link to your images. If you don't prevent this and come across a site that is linking to your images, you can do a "switcheroo".(Change the image that they linked to an offensive image or one that lets them know they are hotlinking.)
To enable hotlink protection on your site, open up your .htaccess file and add the following to the next available line. (Please refer to theIntroduction to .htaccess files tutorialto find out how to use and create .htaccess files.)
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]
If you would like to enable hotlink protection on specific domains only, use the following code. (You will need to add each domain.)
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(www.)?othersite.net/ [NC,OR
RewriteCond %{HTTP_REFERER} ^http://(www.)?othersite.com/ [NC
RewriteRule .(jpe?g|gif|bmp|png)$ images/nohotlink.jpg [L]
Finally save the .htaccess and upload it to your server; most likely in the root directory. Remember that .htaccess files will apply in all subdirectories below it.
Related Articles
- Why do we Need Privacy Protection when we Buy Domain Names?Also known as Private Registration This is a term involved with domain name registration. And it literally means you domain name registration details are kept private or in other words your personal details such as your name, home/ office address, email address and phone numbers are not display......
- Password ProtectionAlthough there are many uses for a .htaccess file, by far the most popular, and probably most useful, is being able to reliably password protect directories on websites. Although JavaScript can also be used to do this, only .htaccess has total security, because someone must know the password to get ...
- JavaScript Password ProtectionOK, I finally got around to writing the javascript password protection tutorial. You will see the example script here is pretty straightforward, but it is also pretty easy to get around. Ill tell you why and give you links to more secure scripts later in this tutorial.
- Is Free Hosting Really Free?Find out why and how hosting services can give away space on thier servers. Sooner or later, as everyone finds out, nothing in this world is free. Although there are literally hundreds of Free Hosting adds surfacing on the Internet, no one can stay in business very long giving it away...
- Private Domain Registration a Must for Every DomainThis article, Private Domain Registration a Must for Every Domain, very successfully explains the need for better privacy in the registration process because a lot of personal information is made public at present.
- RAID - A Laymans GuideEverything you need to know about RAID.
- Domain Name Tips That May Surprise YouMy opinions in this article are based on my 10 years of experience as an internet marketer. Ive purchased more domain names than I care to admit but rest assured there are plenty.
- 10 Questions for Your Logo DesignA logo is a trademark of a company or organization. Its the identity that encapsulates what your company stand for and what it wants to achieve in its lifetime. Companies do spend thousands, if not millions of dollars just to have the right logo...
- Website Hosting - How to Select a Good CompanyTrying to select a hosting package is much like purchasing a new car--there are many different types and ways to go, but in the end it really boils down to how you are going to get where you want to be and the features youll need to get there.
- Password ProtectAdd this login form to a page.

