Is Someone Stealing Your Bandwidth?

If you own a website, you are well aware of the costs involved to maintain it. There are the monthly or yearly web hosting fees, the domain registration charges, and any costs needed to retain a webmaster. As a result, ongoing costs can become somewhat of a burden. This can only be exasperated by unexpected costs, such as expensive charges which are levied if your website exceeds the bandwidth (or "transfer") limits of your hosting package.

This might seem like a normal consequence of increased traffic, but before you go out and upgrade your web hosting plan, it is a good idea to make sure that your bandwidth is not being stolen.

What Is Bandwidth Theft?

Bandwidth theft, also known as "hotlinking", occurs when someone directly links to a website’s files. For example, if another website wanted to display an image that you have on your website, they could directly link to it. Take a look at the code sample below:

<img src="http://www.yoursite.com/image.jpg" width="100" height="100" alt="Stolen Image"/>

This is different from linking to a local image, where the code might look something like this:

<img src="image.jpg" width="100" height="100" alt="Image"/>

And hotlinking is not limited to images. Other websites might also link to your media files, such as songs and videos, as well as other files such as styles sheets and JavaScript code. And if the website has a lot of traffic, the bandwidth that they steal can be very costly.

How Do I Know If My Files Are Being Hotlinked?

It can be difficult to determine if your files are being hotlinked, but there are a few telltale signs:

  1. When you look at your website statistics, your image and media files have been viewed significantly more times than the pages on which they are located.
  2. Your traffic has remained steady, but your monthly bandwidth usage is much greater than expected.
  3. You receive a lot of visits (or requests) from certain websites.

How Do I Prevent It?

The easiest way to prevent hotlinking is to use the hotlink protection utility provided by your web host. If such a utility is not provided, you can use an .htaccess file. And all you need to create this file is a simple text editor. Simply copy and past the code below. Be sure to replace yoursite.com with the domain name of your website.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|js|css)$ - [F]

Additionally, if you want to add more filetypes, simply add additional file endings to the final line of code.

Should I Stop Hotlinking?

So, now that you know all about hotlinking, and how it can cost you bandwidth, it is also important to know other consequences of hotlinking.

  1. It might be illegal. By hotlinking to an image that is copyrighted, you might be liable for damages. And your site might even be shut down.
  2. The image or media file that you are linking to could be deleted. By hosting all media on your website, you ensure that it is always available. Even worse, an aggravated website owner might switch the file with something unsavory, that would be sure to shock your visitors and drive them away.
  3. It’s not allowed. Many websites have notices which state that hotlinking is not allowed.

Of course, there are websites which encourage hotlinking, such as free image servers. But unless stated, you should assume that all websites disallow it.

Tags: ,

1 Response to “Is Someone Stealing Your Bandwidth?”

  • On January 22nd, 2009 at 8:22 am, Yahaya Idriss wrote:

    I want to know my actual bandwidth speed also prevwnt people from hotlinking it. Thanks.

Trackbacks

Trackback URL for this entry:
http://www.velvetblues.com/web-development-blog/is-someone-stealing-your-bandwidth/trackback/

Leave a Reply

CommentLuv Enabled

Want us to work on your project?

Contact us today for a quote. Click here to submit details regarding your project.

If you are making a general inquiry, send an email to info@velvetblues.com