You need to keep an ever watchful eye on your statistics because if you have any type of image on your site, someone will take a liking to it and often just use an external image link to pull it onto their web site. This is known as "Hot Linking" and is rife throughout the web. But with most good control panels supplied with your hosting package, you should be able to disable hotlinking and allow only a selection of sites, if any, to link to the image.

Why is this necessarily a problem?
Well basically if someone else is displaying an image on your server on their web site then they are feeding off your bandwidth. Why should you be paying to host the image and let them steal your bandwidth without permission? You can often see this through the referrers to your web site and also if your bandwidth seems higher than normal for the number of visitors you're receiving. So what to do? In cPanel there is a hotlink icon, going into this page will give you the option to enable hotlink protection. There is a box where you can add allowed web sites. Note NTL users and possibly others will not see the images displayed on your own site if you don't tick the 'allow to view image in browser' as NTL and other certain ISPs cache your site on their servers to improve speeds to the end user (well artificially improve), so in theory NTL are linking to your images and considered a hotlinker. I don't know NTL's domain to allow as ntlworld.com and ntl.com hasn't worked for me (I use NTL in Cardiff).

Often a question asked is, will it affect Google Images and other Image search engines. The answer is No. Google copies and caches your image on their own server. When you do an image search there is a thumbnail displayed. On clicking the thumbnail a larger version of the image is displayed with your site below. The thumbnail and larger images are both stored on google's web site so therefore are not hotlinking and won't be blocked. The site below is in a separate frame and is loading the page and images on your server, and again shouldn't be affected.

Remember however, if an external site still tries to link to an image when hotlinking is on, it will still create a 'hit' to your site. It will also use a small amount of bandwidth, but I would say less than 500 bytes of bandwidth is used. How to tell if it's working, either empty your cache and visit a site trying to hotlink, else look at your statistics. There are error codes often listed, and a hotlinked protected image will generate a 302 error. You can also see this in the raw logs file. Find the offending site using a Find function, and then you'll see the IP of the user, the filename of the image followed by a code which should say 302, another code number and then the offending site's web address as the referrer.

Of course if you're not so fussed on whether your images perform well in google search, then you can always rename the file and replace the linked to file with advertising for your web site "This image is the property of domain.com and is being displayed without permission". To put it politely!

Trackback URL for this post: http://www.stuffbysarah.net/2005/08/25/hotlink-protection/trackback/

Leave a Reply

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

*

Latest Tweets

  • Had a busy day but feel like I've tied up a lot of loose ends of work, plus getting the ball rolling on a new job. Fun month ahead! 7 hrs ago
  • Gorgeous but cold day out there. Nappies already out on the line getting plenty of sun. Shame I have to work, great photo ops out there 20 hrs ago
  • I've just increased my Dropbox space by over 3GB for free by syncing the photos off my phone. So easy :-) 1 day ago
  • More updates...