Amit Bhawani Blog

Stay Updated!

Powered by Genesis

You are here: Home / Ultimate Guides / Ways to Stop Image HotLinking & Bandwidth Theft

Ways to Stop Image HotLinking & Bandwidth Theft

December 28, 2009 by Amit Bhawani

Image HotlinkingHotlinking is a way in which someone would directly link to your website hosted Image & Video Files because of which the you need to pay high bandwidth bills. This is the very reason its really important to make sure that you can stop hot-linking and make sure that other website owners don’t steal your bandwidth. You can easily detect this stuff when you use tools like tynt or when you check out your website’s statistics log through Awstats. Normally when you add a Image in your website or blog, it would be added in the following way.

<img src="imagename.jpg" height="500" width="300">

But when the Image is Hot Linked by someone else, then the code would be changed and when you view on the source code you will find it as below listed.

<img src="http://www.amitbhawani.com/imagename.jpg" height="500" width="300">

You can easily point out the difference, which means that the bandwidth stealer is going to directly put your website image URL for showing the Image on his website. Hence, whenever his website is accessed and loaded, your website Image is loaded, hence increasing your Broadband Bills. Few regularly seen situations where we find out Images Stole are on Auction Websites like ebay, Classified Websites and Webmaster Forums in most cases of these the content is posted by guests and visitors. This is something which everyone should avoid and if they are not interested in hosting the Images on their server, then its recommended that they should be using different free Image Hosting services.

Next we need to find out different ways which can stop our Images from being HotLinked. Here are few of them :

The stealer’s would normally right click on the Image and Copy Image Location and then Embed the same on their websites. This is one of most easiest way of copying someones Image and using them. In order to stop people from opting this way, its recommended to Disable Right Click option on your Blogs or websites using plugins or Javascripts. This can not only Disable Right Function but would also make sure that others cannot copy your content too.

Using .htaccess to Stop HotLinking & Bandwidth Theft : Next way would be by Implementing .htaccess Tricks which would show some other Image on the Target Website whenever they would HotLink your Images. This can be easily done and using some Pranks or Funny Messages on the Images you can even build in some Backlinks to your website when others would find this out.

If my site url is www.amitbhawani.com and i want to make sure that someone is not able to steal my Images i would have to create a new Image name which would be dislayed on the stealers website. Hence if the Original Image is myimagename.jpe, you can name the to be shown Image as funnyimage.jpe and then add the following code in your .htaccess file which is normally located on your website’s or blog’s root folder.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(. \.)?amitbhawani\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /funnyimage.jpe [L]

The first line of the code would start with the rewrite function and the second line would define your own domain name which can be considered under the While List. Next is the going to allow empty referrals, following which is the line which would show the Image as a replacement of the original file. In case you dont want to show any replacement Image and just show a error to save 100% of your bandwidth, then its recommended to show a 403 Forbidden error by using the following code in your .htaccess file.

RewriteRule .*\.(jpe?g|gif|bmp|png)$ – [F]

That’s it the above listed process can make sure that you can show a Replacement Image instead of the Original Images when someone steals them and uses them on their websites. Let us know if you find any issues in implementing this. Following is one interesting way of stopping Image HotLinking where in the Original Image owner edited and added some funny text to the Image as shown below. [Source]

Steal Image Hotlinking
Steal Image Hotlinking

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

About

My name is Amit Bhawani and here I like to share my internet/tech experience with my online readers. You can follow me on Twitter, Facebook & Instagram at @AmitBhawani I am also the Editor-in-Chief of PhoneRadar & Master Gadgets

About Amit Bhawani

My name is Amit Bhawani and here I like to share my internet/tech experience with my online readers. You can follow me on Twitter, Facebook & Instagram at @AmitBhawani

Comments

  1. Pavan Somu says

    December 29, 2009 at 8:08 am

    Nice tutorial bro. This trick will be most helpful for professional bloggers like you. Thanks for sharing.

  2. Veron says

    December 30, 2009 at 12:34 pm

    This is certainly very effective in stopping other websites from hotlinking and using your bandwidth. The only problem is when your images are hosted on a CDN. The htaccess does not seem to work in this case.

  3. Harsh Agrawal says

    December 30, 2009 at 1:17 pm

    Nice Post Amit but I still have a doubt on this : This may stop showing your images in feeds and email readers. I guess we need to add a condition for it..

    • Amit Bhawani says

      December 30, 2009 at 1:28 pm

      Yes we can have options to enable and disable the conditions on selected websites only.

  4. Tamahome Jenkins says

    December 31, 2009 at 7:13 am

    To be honest, I don’t really mind this practice. I don’t do it myself because I like to be able to control image settings, but if someone borrows my image it doesn’t bother me. Then again, I haven’t had any issues because of it. I suppose I would change my mind should my site start to suffer because of hotlinking.

Timeline

Check out Just EV Tweets by @amitbhawani

Recommended To Read

  • How to Find your WiFi Signal Strength & Dead spots in your Home – Best Apps
  • The Wuhan Corona Virus Effect in India – How to Stay Safe
  • This Blogger Lost 25Kgs with this Secret Strategy that Includes a Fitness Tracker
  • Making Money on YouTube, MCN, Useful Tools, Tips & Success Stories
  • The #JaguarPerformance Experience that was Mind Blowing