How to prevent deeplinking images from your website

Other sites deeplinking images from your account can cost you a fortune on bandwidth. If you see in your stats that some pictures are being deeplinked then do something about it! This is what you could do:

add the following lines to your .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^(http://|https://)(www.)?(site.com).*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ – [F]

Please follow and like us:

By Leendert

Leendert van Achteren is a Business Analyst and part-time Web Entrepreneur. He's building and managing websites with SEO in mind He's writing about anything that has his interest, but especially focusing on market transparency for consumers.

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.