Image hotlinking bad!

I have avoided blocking image hot linking for a long time as I didn’t ever think it would be necessary. However it seems users of the wonderful have taken a liking to some of my images and started hot linking them from their pages. As such I have decided to block hot linking of my images using a simple set of Apache rewrite rules in the .htaccess file for this site.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !=""
RewriteCond %{HTTP_REFERER} "!^*$" [NC]
RewriteCond %{REQUEST_URI} "\.(jpg|gif|png)$"
RewriteRule .* - [F]

These rules come straight from the wonderful Apache Cookbookby Ken Coar and Rich Bowen.

Please let me know if you notice that this has broken any of the images on this site!.

2 Responses to “Image hotlinking bad!”

  1. Static Brain says:

    Image hot linking is nasty. I have had people do that to me too. Sure eats up the bandwith. Not anymore though, because I did the same thing you did. Learning about .htaccess was a little complicated but by far one of the best things I did. I feel sorry for people who aren’t on apache servers. I do not know of anyway they can stop hotlinking. It is becoming a huge crime. You were smart to block it.

  2. […] Reviewing my referrer logs again after the recent hotlinking issues I noticed another new referrer cropping up Taking a look at the site in question it seems to be a WordPress install aggregating the content from a lot of WordPress blogs including most of those pulled into the official and unofficial WordPress planets ( and respectively). […]

go to dashboard
go to login
show/hide help
edit post/page
comment on post/page
go to moderate comments
%d bloggers like this:
Skip to toolbar