Ann Smarty

How to Protect Your Images from Hotlinking

June 11th, 2008 by Ann Smarty | 6 Comments

A while ago we published a post discussing how image hotlinking might be beneficial for your site. Naturally we collectively came to the final conclusion that there is more harm than benefit in other sites hotlinking yours:

So here are a few ways to prevent people from hotlinking (beside using your cPanel that normally has “hotlink disabling” option):

  • Apache server based : configure your .htaccess file to allow only your domain to access your image files (more info can be found here):

hotlink protection

Note: hotlink prevention won’t stop Google from indexing and ranking your images in Image Search as it uses your image cached version rather than hotlinking to your image.

If you think your image search traffic is useless and even more, it also steals your bandwidth, you can always remove your images from Google image search: make sure all your images are located in one separate directory and block it with your robots.txt:

User-agent: *
Disallow: /images (to stop your image folder from being crawled by anyone)

or

User-agent: Googlebot-Image
Disallow: / (to ban Google image search specifically)

or

User-agent: Googlebot-Image
Disallow: /*.jpg$ (to prevent Google from crawling all your .jpg files)





Comments

6 responses so far ↓

  • Alphane Moon on Jun 11, 2008 at 10:20 am

    Hi Ann,

    I have seen many websites rank high with hotlinked pictures in google image search.
    Installing a “hotlinking protection” is a very good idea. But google will also rank pages in image search that hotlink to images and where a .htaccess hotlink protection has been installed on the original site. The effect is that a user won’t see the image.
    I have also seen that google sometimes lists the original domain some weeks later instead of the hotlinking domain, the way it should be.

    Traffic from image search can be enormous.

  • Louis Liem on Jun 11, 2008 at 11:05 am

    A lot of people don’t realize they can lose their bandwidth due to hotlinks. People who hotlink mostly don’t realize that they should host the images their own

  • pbx on Jun 12, 2008 at 1:02 am

    I get lots of search landings via image search.

  • anton on Jun 17, 2008 at 8:39 pm

    Image search from google can help in page ranking. (My opinion)
    The cons is that with the image search, the hotlinkers start poping up and it is quite some work but also fun to get rid of them. Could write up quite some stories with my hotlinkers. Have not seen a way of preventing any hotlinking which really works and is not too intrusive.

  • Sasa Bogdanovic on Jun 19, 2008 at 6:18 pm

    @Alphane Moon, a question maybe just a bit off topic.
    I agree that traffic from image search can bring a lot of traffic. Do you know if there is a way to understand using Google Analytics which keywords brought the visitor to your site using Image Search? The problem I am having is that visitors from Image Search are coming to the home page of my blog that has a number of images, at least one per post, so I cannot realize by the landing page neither.

  • Rob Reid on Jan 19, 2009 at 8:28 pm

    You will also find that you may bave problems if your site delivers marketing emails that use HTML and directly link to the images to your site users. Unless you create rules to handle every possible type of webmail/email client you will be delivering broken images to your subscribing memebers.

Leave a Comment