Have you ever caught someone hot-linking an image on your site? If you don’t know what hot-linking is: (from Wiki)
Hot-linking is when someone uses a link to an image that is saved on another website instead of saving a copy of the image on the website that the picture will be shown on.
Why hot-linking is bad? Because when someone is hot-linking your image, he/she is using your server’s bandwith to serve the image to their readers. So let’s say you took a picture in Paris on a holiday and you put it up on your blog (let’s say the file size is around 1 Mb). I saw the photo on your blog and then hot-link it on my own blog. That means when my readers view the photo, they actually use your server’s bandwith instead of mine to display the picture. If I have 1000 readers daily looking at the picture, that means I’ve stolen 1000 * 1 Mb of bandwith from you and you are not even aware of it.
What you need to do, is to create an htaccess file and put it on the folder where you store your images. Inside this file will be a set of rules to tell your server, that none of the files inside can be accessed/loaded if they are not requested by a page on your own site. So for example, “If a website outside of www.cravingtech.com wants to load an image from my server, rejects it”. You can also be creative and redirect all images to an image of your choice, for a revenge, if you are into that kind of thing ^^
Instructions
Download the htaccess file from here, open it with your text editor and replace YOUR_DOMAIN with your domain name. On the last line, replace it with the path to the image that you want to display when someone is hot-linking your images. Or if you prefer to just block it, simply change the last line to
RewriteRule \.(gif|jpg)$ – [G]
Then, upload the file to the folder that contains your images & their respective subfolders. Rename the file to [dot]htaccess (replace “[dot]” with .)
Revenge is sweet
For example, here is a screenshot of the site that is currently hot-linking to my image:
After I applied the htaccess with image forwarding, the site now looks like:
That should teach em’ a lesson! :D
My question is: I feel bad about the site’s author, though. Should I notify the owner? He/She probably doesn’t know that hot-linking is bad. I mean, I’ve done them before, I’m not a hypocrite. What do you think?
Comments are closed.