Rice Blogger

Malaysia Internet Marketing, Blogging Tips, SEO, Make Money Online and Internet Entreprenuer. 2

Detect and Prevent Image Bandwidth Stealing

Posted by Adi Wong On August - 5 - 2009

An important task as a webmaster is to prevent your resources to be stolen or your website to be hacked. I had both of this experience now after finding one of my blog got 280gb of bandwidth used on the month of June 2009 and even at 2rd week of July it is already at 350+gb of bandwidth used. Fortunately and unfortunately, I did not even get any warning email and no service disconnection from my Hostgator Shared Hosting account.

This is the stats with around 1k users a day. You can confirm someone is stealing your bandwidth when you see a sudden of increase in bandwidth usage and also see that your image bandwidth is taking a whole chunk of your bandwidth (my case was 96% of the 400+ gb at the end of the month)

image-hotlinking

Immediatelly I use .htaccess to prevent image hotlinking by adding the code below into the .htaccess file:-

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?website\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png|jpg)$ /no-hotlinking-image.jpe [L]



I know that there is draw back on this but this is the quickest and most popular method to solve this problem and as you see the bandwidth drop pretty quickly after 13 July. After that I have reduce the size of  my no-hotlinking-image.jpe to a bare minimal and also remember to include some advertisements on the image.

To find out who is stealing your image bandwidth you can check out the raw access logs. This is where I look for at cpanel admin. Download the logs and if you see some image being load on other url other than yours, visit them and you should see your image (no-hotlinking-image.jpe) display on their page.

detect-image-bandwidth-stealing

ClassiPress Banner 2

Random Posts

Posted in :Blogging Tips

19 Responses to “Detect and Prevent Image Bandwidth Stealing”

  1. tekkaus says:

    These people are really bad. They even will steal your bandwidth. I’m still hosting my blog on blogger, so no problem. ;)

  2. Bidet says:

    This is good to know, its always bad to find out that some one is stealing your bandwidth. Thanks for telling us how to detect it.

  3. Compute Live says:

    I think there is a option for “Hotlink Protection” in your Cpanel which does that for you the easier way….

  4. Thanks Adi – what kind of images were the people stealing?

    I thought this kind of thing just happened to merchants who had banners for their affiliates or people with income screenshots, but obviously I need to check my logs!

  5. I also had one of my topics stolen recently, unfortunately on this occasion the hotlinked topic gained quite a bit of exposure and took away some of the limelight from the original which was a bit frustrating.

    This solution would have been good fun to put to use! I’ll have to remember it for next time..

  6. Lee Ka Hoong says:

    I’ve never bothered about my bandwidth since I hosted my blog with Exabyte with a 10GB disk space and 100GB bandwidth, should be enough for a few sites. Anyway, thanks for sharing this tips!

    Btw Adi, could you please try to visit my blog and let me know how long do you take to load my blog main page? Most of the US blogger said my blog was slow in loading speed, I was curious whether is my hosting problem or my WordPress plugin problem, and perhaps US blogger load slow because I’m using Exabyte in Malaysia?

    Can you try to visit and let me know? Thank you very much!

    Regards,
    Lee

    • Adi Wong says:

      hi lee,

      Honestly, I felt that exabytes speed accessing from overseas is slow…real slow..that is why I have 2 hosting…

      but accessing from malaysia is fine with exabytes..

      try this http://www.vertain.com/?sst

      my exabytes hosted site just timeout …hehe….this site loads about 10 secs…

      this service previously is better whereby I can choose from various countries…but I am assuming that this is the speed for traffic from US.

  7. Beads says:

    You guys have crazy speed bandwidths. but mine is crazier with just 50kbps, hows that?

  8. I never check that, i will try your method.

    David

  9. hk says:

    Gotta be careful with this Adi. I once heard it could also restrict images from showing in RSS.

  10. Jayce says:

    20GB in 1 day? What are the stuff that they stole? So much bandwidth?

  11. Adi, you mentioned that using this method have some draw back, may I know what’s the draw back of using it?

  12. Fahad says:

    I have not bothered about my bandwidth because my site is using very small bandwidth as it is only 3 months old. but for future this article is nice to detect bandwidth stealing.

Leave a Reply

About Me

Adi Wong is a Malaysian with a passion in Internet Marketing, Photography, and Programming.