Chitika - Turning Pageviews Into Profit
Powered by MaxBlogPress  

 


How To Disable Image Hotlinking


For more information and special deals related to any of the issues on this page, place your cursor over the double-underlined links. All information supplied by Kontera.com. Kindly subscribe to my feeds via RSS reader or via e-mail if you want more updates.

Image hotlinking is when other people display the image hosted in your web server on their own website. That is, they directly use the image from your website, instead of downloading it and uploading it on their own server.

This is not a problem if you have plenty of bandwidth, a dedicated server and you don’t care. :) However, if you are in a paid shared hosting service where every KB of bandwidth, every memory and CPU usage count, allowing image hotlinking could give your web server additional load. Your bandwidth can be consumed faster. Memory and CPU usage could be higher than normal if someone hotlinked one of your images in a high-traffic site.

Because of this, I decided to disable hotlinking of images hosted on my blog. Images will only be displayed if it is used by macuha.com. Sites hotlinking to the images will see nothing.

Here’s the code I added on my .htaccess to accomplish this task:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?macuha.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ - [F,NC]

If you have cPanel. this could be accomplished easily. Here’s how. I don’t have cPanel so I have to directly edit the .htaccess file.

Download your free Guerilla Bloggers' e-book here!

Bored? Play Pinoy HangARoo!

If you like this post, buy me a beer!

Related Entries:



9 Responses to “How To Disable Image Hotlinking”

  1. cloyd Says:

    Oheay… thats one of the problem yung mga bloggers running there domain.. kasi medyu mahal nga yung bandwidth…But you shuld be happy if pag aabot kana ganun..kasi meaning okay na yung traffic mo unless yung mga asstes mo e anglalaki nila image/video… Before i do add bandwith 5gig/week.. sobrang maintenance… thats why i decide na kumuha nlng ng vps… ang now… no worry na ako i can set my bandwith unlimited….

  2. susi Says:

    sir, pa x-link naman o please

  3. Jan Alvin Says:

    wow! nice tips, tamang-tama yan, naka shared hosting lng kc me. btw mmya n yung solar eclipse, hindi siya kita sa pinas kaya may live webcast link sakin.

  4. Jehzeel Laurente Says:

    @Jan Alvin - hehehe di ko nakita yung solar eclipse nakatulog ako.. hehehe

  5. tonex Says:

    Nice tip. I just enabled it (after I read it here) in my cpanel. The only drawback here is pwedeng bumagal ang loading ng pages mo. Pero kung wala kang gaanong visitors gaya ko, wala kang masyadong mararamdaman. :D

  6. jayl Says:

    great tip! thanks! will do that on my sites.

    @ jan alvin - palaging huli ako sa balita.. hahaha sayang. tsk.

  7. ted Says:

    Great advice man. Image hotlinking is really annoying, and this is how I stop it. More posts like this in the future please.!

  8. jijiji Says:

    That is really good info to have. I don’t have a problem with
    hotlinking but my girlfriend does. Muchly appreciated.

  9. tanzanite Says:

    Thanks for the heads up. Nothing more annoying that hotlinking. Arent those days over yet ? :P

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

By clicking the Submit Comment button, you hereby agree with my Comment Policy.






© Macuha.com | Make Money Online | Privacy Policy | WordPress | LoseMyMind | Doogle