Stop Bandwidth Thieves with HotLink Protection in cPanel

You spend all this time designing and building a website, only to see that somebody has already copied your information to there site. To make things worse, they use your hosting to display the images (this is known as hot linking). While, I cannot tell you how to stop people from stealing your content, I can show you how to stop people from stealing your bandwidth.

This tutorial will show you how to setup HotLink protection using CPanel. If you do not have a host that provides CPanel, I highly recommend switching to one that does. Of course, one of my companies, CSSW can provide you with cheap cPanel hosting, contact me for more details, there are several other options online. With this protection enabled, every time someone tries to HotLink an image from your site, you can have custom image displayed instead. Usually I will use something like, “This is image belongs to (site), please visit www.yoururl.com to view the original image.” In some cases I have contact the site to remove my content only to have the webmaster reply with a smart response. For those sites I will use something more disturbing, like the gotse image for example. If you don’t now what the goatse man is, you don’t want to. Enough said, on with the tutorial.

First you will need to log into your CPanel account and click the HotLink Protection icon (pictured below)

The hot link protection settings will be displayed.

As you can see above, hotlink protection is disabled. First I will upload my HotLink image. I will upload it to another domain, because the image will not be displayed if we leave it on the same server because it is protected by HotLink protection also. I use my other site, csswv.com to host all of my hotlink pictures for my sites. Then I will test to make sure I can view it.

I can see my image in the browser, now I need to set the HotLink options. First we need to add the sites that we will allow to hotlink. I left the CPanel defaults (teamtutorials.net is my test domain).

Once you have added the sites that you want to allow to hotlink, you will need to type in the url to redirect other sites to. I used the url of my the images I showed you previously. Notice that I also check marked the box that say “Allow direct requests”. I had problems using the full url when using images on my own site, so I leave this option checked and it prevents me getting the hotlink protection on my own site.

When you are finished, click the activate button.

CPanel will let you know that hotlink protection is active.

You can now test hotlink protection by using another website (if you don’t have one you can try myspace or some other site tat allows you to add images). Here is the original image that I should be able to view on the test site (teamtutorials.net).

Now I will test it by hot linking to the image from another domain (test.csswv.com). Here are the results. (note: If you have a problem that the same image displays on both sites, you may have to clear your browser cache.)

It is that simple to protect your bandwidth from being stolen. Somebody could still copy your content and images and upload them to their own server, but at least we have some protection against the lazy thieves. When I enabled HotLink protection on one of my other sites (ProjectCrankwalk) I saw a large number of refferals from on the sites that was stealing my images. I belive it is due to the people seeing the hotlink image and then coming to my site to get the original images.

Subscribe To Our Newsletter

Join the TeamTutorials mailing list and get the latest tips, tricks, and special discounts for members only.

Thanks! Please click the link in the email we just sent you to confirm.