A way to not allow a site to Hotlink

I am wondering if there is any way to no allow a particular site to hotlink files from a server?

or maybe 2 or 3 sites… or 10 or 20… depending on how insane people wanna be…

Right now on my site I have had over 1000 hits on particular images that I would not like to have hotlinked…

Is there anyway to eliminate him from hotlinking?



bandwidth theft sucks!

try this, it’ll work!


Try this in a .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourwebsite.com/.*$ [NC]
RewriteRule .(gif|jpg)$ [F]

This will block all referrers who do not match this rule(enter your website in place of yourwebsite.com). The rule then states any file extention ending with gif or jpg are forbidden.
The file is a plain text file named .htaccess if necessary name it a.htaccess upload to the directory you want blocked or your main domain folder if you want your entire site blocked. Rename a.htaccess to .htaccess. If your ftp program is set to not view hidden files the text file should disappear.

My website

The DreamHost Wiki is your friend!

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

FYI, It is trivially easy to circumvent referer restrictions. For example:


Isn’t technology great?!