Hosting Knowledge Prevent hot linking of images from .htaccess or cPanel
SocialTwist Tell-a-Friend
Advertisement

Prevent hot linking of images from .htaccess or cPanel

Some website users directly link to your website Images and steals the bandwidth of your website. You can avoid hot linking by two ways. From cPanel or via .htaccess file directly.

1. Prevent from cPanel (x2 theme).

Login to cPanel. You will find hotlink protection icon from where you can enable hot link protection.

2. Prevent from .htaccess file.

You can directly place below code in your .htaccess file to disable hot linking:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp|wmv)$ http://www.yourdomain.com/image.jpg [R,NC]

Note: replace yourdomain.com with your domain name.

Thanks!


Rate This Article


  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
poorGreat

Add comment


  • Your name :
  • Email :
  • *Comment :
  • Word Verification

Web Hosting Directory

  • The web hosting directory is for anyone who is searching for website hosting and hosting related resources. The directory is listing Shared, VPS and Dadicated server plans in descending order for customer ratings !!! This web hosting directory is listing plans on the basis of 100% unbiased customer ratings. TheWebHostingDir.com provides you nice tool to easily search all types of web hosting plans including cheap web hosting, ASP.Net hosting, php mysql hosting, Cheap VPS Hosting, Windows VPS, HyperV VPS, Xen VPS and Cpanel VPS Hosting.



Quick search

Request a Quote

If you wish to receive proposals from Web Hosting Companies Suited to your needs.