How to Prevent Your Site From Image Hotlinking

In this tutorial, I will explain how to prevent your site from image hotlinking. This will help you to save
your server bandwidth and cost.

What is Image Hotlnking

Image hotlink is the direct linking to your website’s image files to theft your server Bandwidth. Some people have used your site’s images directly on his website like:

When hotlinking website is loaded, then images are loaded from your website and it used your server bandwidth & costing.

How to Prevent Your Site From Image Hotlinking

You can prevent your website from image hotlinking by using the below code at the end of your htacess file.

In the above code if someone has used your site’s images, then it will be redirected to a custom image. Please keep in mind, this will also affect for search engine & RSS feeds. You can allow all the search engine and RSS feeds to access your site’s images by using below code.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , , , , ,

Leave a Reply

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.