Hotlink Protection



When?

Hotlink Protection allows you to prevent other websites from linking directly to images or files on your site. Aside from illegally using your images, they are also using up your bandwidth!

Lets explain this in a little more detail:

Bandwidth is the amount of data moved from your a website server to a website browsers computer to display parts of a webpage. When browsing a website you are using that websites bandwidth to display the files. Most webhosts limit the amount of bandwidth a site can have and charge accordingly - so bandwidth stealing is very important to them (often if they exceed their bandwidth the site will be taken offline, suspended or the owner will be billed).

The easiest way to think about this is to imagine a complete stranger plugging into your electricity supply without your consent and you having to pay for it!

How?

If a user hotlinks to a protected file type on your site, they will either get nothing or can be redirected to a page of your choice.

So what is hotlinking?

If you look at how you display a graphic on your website:
<IMG src="image.jpg" height="350" width="200">
This tells the site to request image.jpgfrom the same server as the rest of your site.

But, if someone was hotlinking from another site, they may hotlink the image like this:
<IMG src="http://www.notmysite.com/image.jpg" height="350" width="200" >
Everytime the page with this code in is displayed the outside server (potentially your server!) has to use its bandwidth to display the image. In short don't link to files on servers that don't belong to you. If you have permission from the owner to display the image - take a copy of it and upload it to your own servers, and use the hotlink protection in cPanel to stop people doing this to you.

There are lots of reasons why you should stop hotlinking. For one it's stealing, but secondly an upset webmaster that realises you are hotlinking may decide to switch the image you are linking to and replace it with something else with the same filename. This can have very funny results - but may get you in a lot of trouble with your own host for displaying obscene content?!??!

HowTo:
  • The top of the page displays whether hotlink protection is enabled or disabled.
  • Ensure that all variations of your site URL are listed in the Urls to Allow Access box.
    These will be the only ones allowed to link directly to your files, you may also want to include sites like eBay on here or your payment processor?
  • List the specific file types you wish to protect (seperated by commas) in the box Extensions to Allow.
  • In the Url to redirect to box, you can specify a page to redirect anyone trying to hotlink to files on your site to.
  • You also have the option to allow Direct Requests. This would allow someone to enter the specific URL of, for example, an image file.
    This is quite different from someone displaying the image on their own site but hotlinking to your image on your server.
  • Click Activate.
More Tutorials