How to Stop stealing of Bandwidth or Hotlinking of Images ?

Bandwidth truly matter to all webmasters and they take care of it as they pay for it, and its really annoying and frustrating that a person else is stealing your bandwidth by hotlinking the pictures on there Blogs or web sites.

What is Hotlinking ?
It is also know as Inline LinkingHotlinking means when you host a image on your server and some other person use that image on there Blogs or internet sites by utilizing &ltimg> tags. Code for the images hosted in your server looks a thing like this &ltimg src=”/images/anything.png”> but somebody other utilizes that image with no uploading on there server the code looks some thing like &ltimg src=” at all.png”> and this is genuinely poor for any webmaster as they are employing there bandwidth for cost-free and he is paying for his Bandwidth like a hell.

Stop Hotlinking How to Stop stealing of Bandwidth or Hotlinking of Images ?

So how you can stop it ?
Its a just a play of a .htaccess one just need to put some needed codes on there .htaccess files. (You can uncover .htaccess file in your root directory.)
Ok lets begin, open your .htaccess file, and place following code in it.

RewriteEngine On
RewriteCond %HTTP_REFERER !^http://(.+.)? [NC]
RewriteCond %HTTP_REFERER !^$
RewriteRule .*.(jpe?g|gif|bmp|png|jpg)$ /pictures/nohotlink.jpe [L]

change mysite with your web site name
Then develop a image and save it with name nohotlink.jpe if you are saving with any other name then adjust the name in the code too, but bear in mind the format should be .jpe not .jpeg. You have to save it in .jpe format since .jpeg or .jpg files are now blocked from appearing on third celebration internet sites.
Ok, following generating the image file upload it on /image directory, or you can just upload it on any other image uploading server such us imageshack or tinypic or some other.

I love Tech3Dge How to Stop stealing of Bandwidth or Hotlinking of Images ?
If you upload on some other server then change /pictures/nohotlink.jpe to

You can display a 403 Forbidden error code rather of an image. Replace the final line of the earlier examples with this line:

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

and your are done.

For an instance i have also tested it, so what i did I took the image from my previous post and tried to hotlink on my other weblog. By employing &ltimg> tag

Click right here to view the page exactly where i tried to hotlink the image, by viewing the supply code you will come to know which image i tried to copy and which image it is showing.

Hope this will assist you out to Save your bandwidth and hotlinking of your pictures.

If you like this post do subscribe to our RSS Feeds and Like Us on Facebook

Be the first to comment

Leave a Reply