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.”

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

The hot link protection settings will be displayed.
Stop Bandwidth Thieves with HotLink Protection in CPanel

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.
Stop Bandwidth Thieves with HotLink Protection in CPanel

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).
Stop Bandwidth Thieves with HotLink Protection in CPanel

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.
Stop Bandwidth Thieves with HotLink Protection in CPanel

When you are finished, click the activate button.
Stop Bandwidth Thieves with HotLink Protection in CPanel

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).
Stop Bandwidth Thieves with HotLink Protection in CPanel

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.)
Stop Bandwidth Thieves with HotLink Protection in CPanel

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.