Knowledgebase: cPanel
Enable Hotlink Protection for Your Site
Posted by ASO Admin on 20 February 2020 08:59 AM

What is hotlinking?

Hot link protection prevents other websites from directly linking to files and pictures on your website and only allows them to link to file types that you don't specify. If you have a lot of desirable images, for instance, on your site and you get a lot of linking traffic back to that image from other people's sites and on the web, then it's probably eating a lot of your site's bandwidth. The following is a real-life example...

Say I like the image on your website, and I want that image on my site. If I use the full URL of your site's image to link out to, then the image is downloading from your site every time someone looks at that image on my site. This means I am using your bandwidth for the image! When you enable hot link protection it ensures that no one can steal your bandwidth anymore.

Configure Hot Link Protection

To enable or disable hot link protection on your site:

  1. Log into cPanel

  2. In the Security section click Hotlink Protection 

  3. In the URLs to Add Access To text box, make sure the domain name you want to protect is listed

  4. In the Block Direct Access for these Extensions text box, add the file extensions you want to block

  5. Tick the Allow Direct Requests option

  6. Skip the Redirect Request to the Following URL text box 

  7. Click Submit

  8. When you want to disable hot link protection, navigate back to Hotlink Protection in cPanel and then click the Disable button near the top of the page

Now, you've protected your images from being hotlinked! Just be sure that all of your additional domains are in the Hot Link list as well, if you want to protect them too.

WARNING If your images stop working, you may need to check your HTML source code. Some website designers (or programs) use absolute path names for your images. That means, instead of a relative path like '/images/pic.jpg', it will use the entire URL like 'http://www.domain.com/images/pic.jpg'. You must have that exact protocol and domain name listed in your allowed URLs. If there is any slight difference in the protocol (http://) or in the domain name (domain.com/) between the allowed list and the HTML source code, then your images will be blocked.

Note: some firewalls will block a special referrer variable in order to add more privacy for the user. Hot link protection works with this variable to tell where the request is coming from, so in this case hot link protection isn't the best solution to avoid bandwidth theft, as it will eventually block legitimate requests from visitors using one of those firewalls.



Attachments 
 
 hotlinkprotection.png (21.22 KB)
 configurehotlinkprotection.png (77.61 KB)
(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako fusion
ERROR: This domain name (kb.asmallorange.com), does not match the domain name in the license key file help.asmallorange.com.

For assistance with your license, please contact the Kayako support team: https://support.kayako.com