Start a conversation

How do I prevent hotlinking graphics from my domain?

Bandwidth theft or "hotlinking" is a direct linking to web site's files (images, video, etc.). It can be prevented for example with
mod_rewrite module. Place rules like below into the vhost.conf or .htaccess files for the needed domain (for example www.DOMAIN_NAME.TLD):

RewriteEngine on
RewriteCond % !^$
RewriteCond % !^http://(www\.)?DOMAIN_NAME\.TLD(/)?.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|swf)$ - [NC,F]
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Anton Pachkine

  2. Posted

Comments