Ever wonder why your site bandwidth is so high or how your site bandwidth is being stolen.It is because of Image Hot-linking.
Hot-Linking is a term used for Bandwidth theft. It is a process through which an Image or Video is linked directly form a website by using <img> tag. This way the person who uses a link to the picture saves his/her storage and Bandwidth by stealing other bandwidth and money. An example of Hotlinking an image from other’s website.
<img src="www.example.com/image.jpg" height="300" width="250">
But you can prevent it by enabling Hotlink Protection.
Hotlink protection prevents other websites from directly linking to files (images or video) on your website. By hotlink protection you can prevent others from stealing your bandwidth and save your money.
- To Enable Hotlink Protection Go To your Cpanel X >Security > Hotlink protection.
Now configure Hotlink protection by enter your desire domain to allow access.You can also specify which type of file is to be protected,for example jpg, jpeg, gif, png, bmp etc.In Redirect request you can give any Image Url to show error.
- You can also enable hotlink Protection by using .htaccess
You can enable hotlink protection by adding following codes into your .htaccess file.
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?dohack.org/.*$ [NC] RewriteRule .*.(jpeg|gif|jpg|png|bmp)$ – [F,L] </ifModule>
Don’t forget to replace dohack.org by your own URL.