iSnare.com - Free Content Articles Directory
Authors Contents [Advanced Search][Add OpenSearch][Job Search]
Distribute your articles to thousands of article sites for only $2 and below! Read more...

Index  Internet
 

How To Block Hotlinkers

 
[ Contact the Author] [ Send to a Friend] [ Article Publisher] [Make PDF] [ Print] [ Bookmark & Share]
 
Read our Terms of Service before reprinting this article. The submitter specified above has claimed the rights to this article.
Danny Wirken

Hotlinking or bandwidth theft is direct linking to a website’s file including images, video and others on the external website. It has become prevalent in the many forums and message boards on the web that allow users to insert images. The user resorts to hotlinking those when creating the tag as it is not possible to keep on the host site.

The Harm Caused by Hotlinking

When an tag is used to display a JPEG image found on someone else’s webpage so that it will appear on one’s own site, journal, weblog or forum posting, hotlinking is taking place. Other people might find it flattering to know that someone would be interested in a photo they have taken. This practice, however, consumes bandwidth and slows down the web server. When done excessively, the unknowing victim ends up footing an extra bill from his/her hosting provider.

One sure sign of hotlinking is the appearance of strange web sites in one’s referrer logs. When sites that wouldn’t normally be interested in one site are the ones that are appearing, then something is definitely up. When the offending sites are visited, photos owned by the other site are sure to be posted there. They do not make copies of the photo but rather link directly to the photo hosted on the website. Higher than normal bandwidth consumption is another sign. The log analysis tools might even show a higher number of hits for an image than for the page that displays it.

Blocking Hotlinking

The only fool-proof way to stop hotlinking is to turn-off one’s website. This is rather extreme and does not present a viable option to site owners. The best bet lies on creating an .htaccess file. Although there are many variations that exist on the specific regular expressions that can be written, they all accomplish the same thing. One can either throw the client a "forbidden" which means that the image is not there or the client gets to be redirected to another image which is usually something suitably offensive. Using the Rewrite Rule to forbid display of image is a simple rule which effectively blocks the display on remote sites. Redirecting requests for images from remote web pages to an image of choice on one’s website is taking this rule a step further. A good example of this is an image which says “This image is stolen”. A person who tries to link directly to the original images of a site is inadvertently serving the redirected image to his/her pages.

Redirecting a browser from one file type to another is essentially not a good idea. The best approach is to make a separate version of the redirected image in each format that one uses on a site such as one for gif format, one in jpeg format, one on jpg format and so on. Each hot linked image is then redirected to the matching file type.

If one is feeling a little bit mischievous, other interesting images can be served to people hotlinking to one’s images. If the offender site is into selling, for example, an image that says “Free Shipping Worldwide” would surely discourage the offender as the very reason for hotlinking is to make money, even in an unacceptable manner. No company can survive, much less earn with a guarantee such as shipping for free worldwide.

Some people recommend the white list approach. This is basically blocking all referrers except for those sites that are specifically allowed to do so. Again, this approach borders on the extreme as it blocks all requests, legitimate or otherwise. Accidentally blocking legitimate requests from search engines, feed readers and others would be very disadvantageous to the site.

The black approach is a better option as it intends to block some specific sites that are considered the worst offenders. A website owner has to find out if his/her website is on an Apache Server and if the use of .htaccess is allowed by them. A simple email to the web space provider will provide a swift answer. The .htaccess file should go into a website’s root directory on one’s web server.

Verification that everything is working properly on one’s site has to be done. Mod-rewrite is very powerful but it only needs one typo for hell to break loose. The block listed sites should be checked out if the stop image is being shown. It might be a nice twist to include one’s URL on the image. It wouldn’t hurt to get some free advertising in the process.

This is how to disable hot linking of certain file types on one’s site through .htaccess by simply adding the code below to one’s .htaccess file. Uploading the file either to the root directory or a particular subdirectory is necessary to localize the effect to just one section of the site.

RewriteEngine on
RewriteCond%{HTTP_REFERER}!^$
RewriteCond%{HTTP_
REFERER}!^http://(www\.)?mydomain.com/.*$[NC]
RewriteRule\.(gif/jpg/js/css)$-[F]
The “my http://domain.com” is to be replaced by one’s own. The above code creates a failed request when hot linking of the specified file types occurs. A broken image is shown in case of the image.

To block traffic from a single referrer:
RewriteEngine on
#Options+Follow-Symlinks
RewriteCond%{HTTP_REFERER}badsite\.com[NC]
RewriteRule.*-[F]

To block traffic from multiple referrers:
RewriteEngine on
#Options+Follow-Symlinks
RewriteCond%{HTTP_REFERER}badsite\.com[NC.OR]
RewriteCond%{HTTP_REFERER}anotherbadsite\.com
RewriteRule.*-[F]

JavaScript can be used to prevent right-clicking an image when already in a browser. This is a very weak defense though as people just need to switch JavaScript off and/or use a decent browser and it’s all there. Using JavaScript to write images into a page does not offer sufficient protection as hotlinkers can easily link to images once they know the origin URL.

FileProt is a protection script that is simple to set up and use. It does not allow anyone coming from unauthorized places access to certain files in one’s web server. This allows for the specification not only of unauthorized domains but pages in one’s domain as well. It can be specified to allow file or image download from certain pages in one’s domain. Hotlinkers and bandwidth leeches are completely blocked but this script is not intended for super high-traffic sites.

Download Tracker is a CGI script that manages downloads from one’s web page. Options include requests for email address and anti-leech system. It is multi-platform compatible and has a back-end control panel.

Important NoticeDISCLAIMER: All information, content, and data in this article are sole opinions and/or findings of the individual user or organization that registered and submitted this article at Isnare.com without any fee. The article is strictly for educational or entertainment purposes only and should not be used in any way, implemented or applied without consultation from a professional. We at Isnare.com do not, in anyway, contribute or include our own findings, facts and opinions in any articles presented in this site. Publishing this article does not constitute Isnare.com's support or sponsorship for this article. Isnare.com is an article publishing service. Please read our Terms of Service for more information.

Article Tags: file [See Dictionary], image [See Dictionary], site [See Dictionary]
Got a question about this article? Ask the community!
Article published on November 01, 2006 at Isnare.com
 
Rate this article:

Riya: A Big Leap In Visual Search Engines
Submitted by: Danny Wirken

Watch out for new software that will give a new face to search engines Rather, a program that includes faces in the search function...

Taguchi Method: The Key In Ad Optimization?
Submitted by: Danny Wirken

For people who are looking for the secrets on how to master ad optimization, your prayers have been answered...

What A .htaccess File Is And How To Make One
Submitted by: Danny Wirken

A htaccess file is a simple ASCII file similar to that created through text editor such as Notepad or Simple Text...

What You Should Know About Trackback Spam
Submitted by: Danny Wirken

Trackback facilitates communication between blogs When a blogger writes a new entry whether to comment on or refer to an entry found at another blog, the commenting blogger can notify the other blog with a Trackback ping...

What You Newbies Need To Know About Pay Per Click Ads
Submitted by: Danny Wirken

Just about anyone who has been using the Internet in the last few years has no doubt come across the term "pay per click" once or twice...

The Exciting World Of Video Blogging
Submitted by: Danny Wirken

When the idea of weblogs was first introduce online, it was an instant phenomenon Suddenly just about everyone feels the need to create their own space online by writing their thoughts...

The Latest On WordPress Themes
Submitted by: Danny Wirken

As WordPress and blogging become more and more popular, the list of customization options continues to grow...

Tips On How To Deal With Anonymous Comment Spam
Submitted by: Danny Wirken

Have you ever experience being flooded with anonymous comments If yes, then chances are you have been a victim of comment spam...

To Blog Or Not To Blog: The Ups And Downs Of Blogging
Submitted by: Danny Wirken

Whenever the subject of the phenomenon called blogging is raised, most people immediately think associated it with an online diary or weblog...

Trackback Spam Explained
Submitted by: Danny Wirken

In most blog applications, there is a feature called Trackback, which allows the user to send a trackback or notification to a different site or another blog that the user referred to in his own blog...

Web 2.0, A Guide For Newbies
Submitted by: Danny Wirken

A couple of years back Bill Gates introduce the idea of Convergence to the public It was a fresh idea that later became a catchphrase for the Internet Industry...

How To Use Linknotes Plugins
Submitted by: Danny Wirken

When users complained about inline links that are becoming way too obtrusive, someone was bound to find the answer...

Moving Your WordPress Blog
Submitted by: Danny Wirken

Moving a blog can make it unreachable for 24 – 72 hours, unless the new domain name has fully propagated around the Internet...

Google Update: A Test For Keyword Dominance
Submitted by: Danny Wirken

Google is one of the most popular search engines on the Internet today According to statistics about 50 to 80 percent of searches made by users worldwide are being done on Google...

How To Prevent Comment Spam With Google’s No Follow Attribute
Submitted by: Danny Wirken

Putting up and maintaining a weblog of your own could be done for free or built into your paid domain site...

Quick and Simple Overview on Webhosting Services
Submitted by: Ani K

In the present internet world, if we think of something we can get it with in no time It is possible because of the ease of access to the internet where one can search for anything and can get the best result...

Optimizing Your Affiliate Pages
Submitted by: Diana White

With no doubt, Affiliate Marketing is one of the most rewarded jobs in the Web However, it is not an easy field to rank due to the raising competition...

Online Shopping - For Hottest Deals
Submitted by: Robert E. Finch

This is the age of internet and people like to do all their research over the net before they finalize on something...

5 Tips For Website Project Success
Submitted by: Vann Baker

Many website projects actually fail before they even get started This is not intentional, but with technology-driven projects, it is easy to get derailed before the train is out of the station...

Five Tips to Discard Google and Create an Alternative SEO
Submitted by: Klast Munevar

Undoubtedly, Google is the major search engine and the king of the Internet As a logical consequence, all the internet marketers ―independently if they're PPC or affiliate based― know the advantages of working along with its incredible power and the real advantages of its positioned name...

Redesigning Your Website For Success
Submitted by: Vann Baker

What exactly is website "redesign" and why is it necessary Re-designing a website is often thought of as being more of a graphic design process—taking an older website and give it a totally new look so visitors and customers will take notice, or perhaps adding more content to the website so information is readily available to existing or potential customers...

Website Request For Proposal (RFP)—Invaluable
Submitted by: Vann Baker

Why do website projects fail or fall short of expectations Many businesses have the experience of their last website project taking far too long to complete, going over budget and in the end just did not measure up to expectations...

What is a Content Management System (CMS)?
Submitted by: Vann Baker

A content management systems, or CMS, is a great way to manage the content of your website, especially if you have a larger website and different people who are responsible for different parts of the website...

Web Hosting Explained For Newbies
Submitted by: Loren Squires

Introduction Very basically, web hosting is renting space, and certain services, on a fairly powerful computer called a ‘server’, or ‘web server’, that is connected to the internet...

How to Discover the Finest Work at Home Idea?
Submitted by: Seomul Evans

A lot of people are pulled in by their ambition of being able to make an income working online from home...

Basics Internet Marketing Tips You Can Afford to Miss?
Submitted by: Seomul Evans

Online marketing is more important than early kinds by traditional marketing particularly from the point by view of an average out Joe as if you and me...

Top Ways to Make Money Utilizing the Internet?
Submitted by: Seomul Evans

Your internet link at home could provide you numerous benefits than mere checking of mails and browsing the social networking web site...

Make Extra Money Online
Submitted by: Blanca Ciotoiu

If you are expecting that I'm going to tell you a fast way to make extra money online then, you are wrong...

Web Site Design and Development – Tell a Story to Build Your Credibility and Educate Customers
Submitted by: Daljeet Sidhu

The best way to attract customers to your business is to make them understand what sets you apart from the competition...

Traffic Builder For Free
Submitted by: Dansar Gin

After you decide to have a website and to buy a domain name for your website you will ask a lot of questions like: - What is the right way to start...

Isnare.com Footer Divider

© 2004-2009. Isnare Free Articles - An Isnare Online Technologies Free Articles Project. All Rights Reserved.   Privacy Policy