Protect your site from hotlinking

You can protect your site from hotlinking by adding the below given code in your htaccess file .

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://([ -a-z0-9] .)?domain.com [NC]
RewriteRule .(gif|jpe?g|png)$ – [F,NC,L]

Leave a Reply

Your email address will not be published. Required fields are marked *