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.)?*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp|wmv)$ [R,NC]

Note: replace with your domain name.


Add comment Share
Hosting Companies insights
1404 Web Hosting Reviews A trusted source of genuine reviews. Learn Reviews
2628 Web Hosting Companies Ever-growing pool of web hosting providers. Browse Providers
2211 Web Hosting Coupons Exciting web hosting deals available here Browse Coupons