This tutorials is about cpanel built-in hotlink protection option. if you have access to your cpanel account you can follow these steps to prevent people from linking to your content and stop them stealing your bandwidth.
What is hotlinking ?
hotlinking is the term to identify direct linking to hosted images and files. as an example if you are running a blog and your posts has images or a featured image, someone else could link that image directly and embed it in to their own website without having to navigate to your website. this way your host loses bandwidth each time that image is shown to a viewer (loaded) and you wont be getting anything out of it. no views for your website, most of the time no credit, no backlinks, nothing. you simply becomes a free host for others.
How to stop this ?
if you are using linux hosting and has access to your cpanel, this is few simple steps and you can save your precious bandwidth and even redirect those hotlinkers visitors back to your website if you want to.
first of all log in to your cpanel and look for ‘hotlink protection’. it’s under the ‘Security’ section. click and go to hotlink protection options.
then if you haven’t already done so, click on ‘Enable’. you will see ‘URLs to allow access’ text box and you need to have your website’s url http and https with www and non www versions in each line. by default this is provided by the cpanel but if you don’t see this just put all your URL versions along with sub domains and other domains you would like to allow access to. allowing access to google.com is a good idea for google to index your images in google image search.
In the ‘Block direct access to the following extensions (comma-separated)’ section add file types you would like to prevent hot-linking to. cPanel already gives you some image file extensions by default but if you are hosting more file types, as an example .zip files, you need to add it without the dot and followed by a comma.
Finally you can redirect those visitors to hotlinking website to any page you like. it doesn’t even have to one you own or host. just anything. as an example you could redirect all of them to google. after adding your desired URL in the ‘Redirect the request to the following URL:‘ section click ‘Submit’.
If you are publishing adsense on your website, I wouldn’t recommend redirecting these visitors back to your website because source of this visitors coming from could be a non adsense friendly websites so be careful. low quality referral traffic to your adsense website could do more harm than good.