Back to blog

“Hotlinking” or bandwidth theft is when a person uses direct linking to files on someone else’s website (e.g. video, pictures, etc.). Bandwidth is the data that is transferred from a website to devices of its users. To be short, you are using the website’s bandwidth each time when you viewing it. Imagine some person uses your electrical outlets without your permission, and you are paying for the electricity. It is the simplest example of hotlinking.

how-to-prevent-hotlinking

Bandwidth is a serious issue, since the income of web hosts is depends on the amount of transferred data. If your website is over its bandwidth limit per month, it will be taken offline or billed for the extra data.

Hotlinking may lead to a bunch of unpleasant things, since displaying someone`s file or image is a violation. All serious websites, blogs, forums, etc. have copyright policies, and it would not take a long time to shut such an unpleasant website completely.

A simple example of hotlinking is when a person uses an <img> tag to display your JPEG image on his/her own website, forum message post, blog, etc.

This is the image file in the HTML how may be displayed on your website:

<img src=”picture.jpg” height=”560″ width=”330″>

When a website see this tag, it will request the picture.jpg on the same server just as the rest of files.

And this is the hotlinked HTML:

<img src=”http://anothersite.com/picture.jpg” height=”560″ width=”330″>

It means that the site will search for the picture.jpg on some other server.

So each time someone load the page, that outside website is using your bandwidth to display the picture. To avoid this issue, if you need to share files, it is suggested to upload them to a free file hosting that provides direct linking or to the folder on your own server.

Okay. Say I like a picture on your site. I would like to see it on my website. I use your picture`s URL, and each time the people visit my site, that picture is downloading from yours. What can you do? You can enable Hotlink Defence, so I will not be able to steal your traffic anymore.

Hotlink protection disables directly linking to files and pictures on your server. Outside websites will have an ability to use only those files that are not specified in your Hotlink protection list.

How to do it?

This article will inform you how to enable Hotlink protection using your .htaccess file.

Also, you can make the following steps:

  1. Click HotLink Protection in the cPanel (Of course, you should login there first).
  2. Type the domain name you want to protect in the “URLs to allow access” field.
  3. Provide the extensions which you would like to block in the “Block direct access for these extensions” field.
  4. Also, check the “Allow direct requests” field.
  5. Click Submit, after skipping the “Redirect request to this URL”.

If it seems too complicated, you can always try the Htaccess plugin, which will do all the job for you. Just a few clicks and all your files will be protected from hotlinking and you will not have to overpay for the extra bandwidth.

The plugin allows you to control access based on the client’s IP address, hostname, or other client’s request characteristics. It provides an ability to disable any type of hotlinking.

Download Htaccess plugin: https://bestwebsoft.com/products/htaccess/



Popular Posts

Like This Article? Subscribe to Our Monthly Newsletter!

comment

  1. Laura Edgar

    Thank you so much for the post its very helpful.

NEW YEAR SALE
FOR ALL PRODUCTS
-30%
FOR PLUGINS & THEMES

USE THE NEW25
PROMO CODE

Get Discount Now!

This will close in 26 seconds