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.
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.
It can be difficult to determine if your files are being hotlinked, but there are a few telltale signs:
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.
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.
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: bandwidth, htaccess fileTrackback URL for this entry:
http://www.velvetblues.com/web-development-blog/is-someone-stealing-your-bandwidth/trackback/
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