Hotlinking, or Direct Linking, is a method of linking to someone else's server/website to display their images and other files. This equates to stealing bandwidth from others on the Internet. One way to prevent others from doing this to your images is by setting up a .htaccess file for hotlink protection.
To setup hotlink protection, simply create a .htaccess file in your public_html directory with the following code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourdomain.com.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]
There are no comments yet...Kick things off by adding a comment →