LiteSpeed Hosting

Hotlink Protection Tutorial: Save Your Bandwidth

The direct linking of media content of one website by another website or user, termed 'Hotlinking', is a very serious issue for many webmasters. Hotlinking of files is more prevalent among websites that have large amounts of traffic and host many multi-sized images, videos, and media files. Hotlinking is not just restricted to images. It is applicable to different types of files, such as: doc, zip, xls, pdf and many more. This type of linking might be harmful to your website and hosting account as it utilizes your own network bandwidth and server processing power, instead of those of the one doing the hotlinking. It might also violate any security or copyright restrictions imposed by some organizations. There are ways to control who can hotlink your files or even disable hotlinking completely, which will be covered below.

Harmful Effects of Hotlinking

Bandwidth leeching is a serious problem and the #1 reason webmasters enable hotlink protection.

In most cases, people using your web content will rarely ask for permission prior to hotlinking files on a server. A classic example of hotlinking is when a member of a large online community hotlinks an image from your website in their forum signature. Each time a post of that member is viewed, the hotlinked image will be access from your hosting account. Lets say the image being hotlinked is 250KB (Kilobytes) in size and the forum member displaying your image has their posts viewed approximately 2,000 times a day. In this scenario, the bandwidth consumed by just one hotlinked image would be about 490MB (Megabytes) daily. In a months time the hotlinker will have "leeched" around 15GB (Gigabytes) of bandwidth from the resource allotment of your hosting account! That is no small amount, especially for small websites on shared hosting that provide little bandwidth to play with in the first place.

STOP: Hotlink Protection Saves Bandwidth In the worst case scenario, it is not uncommon for bandwidth leeching from hotlinking to cause a website to go over its imposed bandwidth limit, resulting in a suspension of the hosting account, leaving your website down and inaccessible by anyone. Hotlinking is not only looked upon as bandwidth leeching, but also theft of intellectual assets in some situations if the original file owner did not provide consent for their content to be linked to or redistributed by the person doing the hotlinking. Though rare, this could land the hotlinker in some legal trouble. These negative consequences of hotlinking are enough to drive any website owner to enable Hotlink Protection.

Advantages of Hotlink Protection

  1. It prevents other website owners from displaying your web content. This helps in ensuring the securing and safety of your content.

  2. It reduces the network bandwidth utilization and helps you in minimizing costs associated with your website hosting account.

  3. It helps you in protecting copyrights and ensures confidentiality of the website content by restricting illegal access by intruders.

Limitations and Problems Due to Enabling Hotlink Protection

  1. There are some genuine requirements for hotlinking. For example, if you upload photos in your RSS feed. Also, people who use web-based email clients will be blocked as the web mail site would be considered as the referrer. This can prevent legitimate users of your website from accessing content.

  2. Hotlink protection increases the number of processes and load on your web server. It adds another task for your server and swells the processing power requirements. This in turn might increase your processor and memory expenses.

  3. If your website needs to be optimized for speed and overall efficiency then Hotlink Protection might be a bottleneck.

cPanel Security: Enable Hotlink Protection

cPanel is the most widely used control panel by web hosts. It allows clients to rapidly and effortlessly handle their web accounts. Hotlink Protection is one of the most commonly used security features of cPanel. The primary reason for cPanel's recognition is due to the fact that it provides you an extremely simple and easy to use interface for performing formidable web site management tasks. cPanel Hotlink Protection inspects the requesting URL and denies requests from sites that have been barred from getting access. If the Hotlink Protection feature is enabled then it will disallow the linking of pictures or content from your website.

How to provide Hotlink Protection of website files using cPanel:

  1. You can buy cPanel licenses and add-ons based on the requirements of your web server.

  2. Install cPanel on the web server that hosts your website if it isn't already installed.

  3. Login to your cPanel account by navigating to

  4. Under the security header you will find an icon for Hotlink Protection.

  5. Click on the icon. It will open the Hotlink Protection tab. By default, the Hotlink Protection is disabled.

  6. Under the subheading 'URLs to allow access', include all variations of website URLs that need to be allowed to link directly to your content and files.

  7. If there are any additional file types that need to be protected from hotlinking then enter these file extensions as comma separated list under the subheading 'Block direct access for these extensions'.

  8. Under the subheading 'Redirect request to this URL:', enter the URL where you would like to redirect users trying to hotlink your files.

  9. You also have an option to allow direct requests. This allows users to manually enter the URL of the protected file in the browser address bar. This is different from someone hotlinking to your files from their website.

  10. cPanel provides the flexibility to optionally redirect the request to another image instead of the original image on your site.

  11. Upon clicking submit, cPanel enables the Hotlink Protection for your website.

  12. You can easily disable Hotlink Protection by going back to the main page and clicking on 'Disable Hotlink protection'.

Hotlink Screenshot: How to Configure Hotlink Protection

cPanel is an amazing tool that allows you to manage websites with minimal fuss and relative ease. The choice of enabling Hotlink Protection in cPanel depends upon the type and size of website you are managing as well as your hosting setup. Website owners with high powered hosting accounts and dedicated servers most likely have plenty of bandwidth to spare so that hotlinking isn't a big issue. However, those using shared hosting on servers with hundreds of other sites probably have minimal bandwidth available to just allow anyone the ability to hotlink their files.

Web Hosting Terms

Latest Hosting Guides