|
|
|
How To Block Hotlinkers
otlinking or bandwidth theft is direct linking to One sure sign of hotlinking is a website’s file including the appearance of strange web images, video and others on the sites in one’s referrer logs. external website. It has become When sites that wouldn’t normally prevalent in the many forums and be interested in one site are the message boards on the web that ones that are appearing, then allow users to insert images. The something is definitely up. When user resorts to hotlinking those the offending sites are visited, when creating the tag as it is photos owned by the other site not possible to keep on the host are sure to be posted there. They site. do not make copies of the photo but rather link directly to the The Harm Caused by Hotlinking photo hosted on the website. Higher than normal bandwidth When an tag is used to display a consumption is another sign. The JPEG image found on someone log analysis tools might even else’s webpage so that it will show a higher number of hits for appear on one’s own site, an image than for the page that journal, weblog or forum posting, displays it. hotlinking is taking place. Other people might find it flattering Blocking Hotlinking to know that someone would be interested in a photo they have The only fool-proof way to stop taken. This practice, however, hotlinking is to turn-off one’s consumes bandwidth and slows down website. This is rather extreme the web server. When done and does not present a viable excessively, the unknowing victim option to site owners. The best ends up footing an extra bill bet lies on creating an .htaccess from his/her hosting provider. file. Although there are many
variations that exist on the separate version of the specific regular expressions that redirected image in each format can be written, they all that one uses on a site such as accomplish the same thing. One one for gif format, one in jpeg can either throw the client a format, one on jpg format and so "forbidden" which means that the on. Each hot linked image is then image is not there or the client redirected to the matching file gets to be redirected to another type. image which is usually something suitably offensive. Using the If one is feeling a little bit Rewrite Rule to forbid display of mischievous, other interesting image is a simple rule which images can be served to people effectively blocks the display on hotlinking to one’s images. If remote sites. Redirecting the offender site is into requests for images from remote selling, for example, an image web pages to an image of choice that says “Free Shipping on one’s website is taking this Worldwide” would surely rule a step further. A good discourage the offender as the example of this is an image which very reason for hotlinking is to says “This image is stolen”. A make money, even in an person who tries to link directly unacceptable manner. No company to the original images of a site can survive, much less earn with is inadvertently serving the a guarantee such as shipping for redirected image to his/her free worldwide. pages. Some people recommend the white Redirecting a browser from one list approach. This is basically file type to another is blocking all referrers except for essentially not a good idea. The those sites that are specifically best approach is to make a allowed to do so. Again, this
approach borders on the extreme twist to include one’s URL on the as it blocks all requests, image. It wouldn’t hurt to get legitimate or otherwise. some free advertising in the Accidentally blocking legitimate process. requests from search engines, feed readers and others would be This is how to disable hot very disadvantageous to the site. linking of certain file types on one’s site through .htaccess by The black approach is a better simply adding the code below to option as it intends to block one’s .htaccess file. Uploading some specific sites that are the file either to the root considered the worst offenders. A directory or a particular website owner has to find out if subdirectory is necessary to his/her website is on an Apache localize the effect to just one Server and if the use of section of the site. .htaccess is allowed by them. A simple email to the web space RewriteEngine on provider will provide a swift RewriteCond%{HTTP_REFERER}!^$ answer. The .htaccess file should RewriteCond%{HTTP_ go into a website’s root REFERER}!^http://(www\.)?mydomain directory on one’s web server. .com/.*$[NC] RewriteRule\.(gif/jpg/js/css)$-[F Verification that everything is ] working properly on one’s site The “my has to be done. Mod-rewrite is href="http://domain.com" very powerful but it only needs title="http://domain.com" one typo for hell to break loose. target="_blank">The block listed sites should be color="#001000" checked out if the stop image is size="-2">http://domain.combeing shown. It might be a nice >” is to be replaced by one’s
own. The above code creates a decent browser and it’s all failed request when hot linking there. Using JavaScript to write of the specified file types images into a page does not offer occurs. A broken image is shown sufficient protection as in case of the image. hotlinkers can easily link to images once they know the origin To block traffic from a single URL. referrer: RewriteEngine on FileProt is a protection script #Options+Follow-Symlinks that is simple to set up and use. RewriteCond%{HTTP_REFERER}badsite It does not allow anyone coming \.com[NC] from unauthorized places access RewriteRule.*-[F] to certain files in one’s web server. This allows for the To block traffic from multiple specification not only of referrers: unauthorized domains but pages in RewriteEngine on one’s domain as well. It can be #Options+Follow-Symlinks specified to allow file or image RewriteCond%{HTTP_REFERER}badsite download from certain pages in \.com[NC.OR] one’s domain. Hotlinkers and RewriteCond%{HTTP_REFERER}another bandwidth leeches are completely badsite\.com blocked but this script is not RewriteRule.*-[F] intended for super high-traffic sites. JavaScript can be used to prevent right-clicking an image when Download Tracker is a CGI script already in a browser. This is a that manages downloads from one’s very weak defense though as web page. Options include people just need to switch requests for email address and JavaScript off and/or use a anti-leech system. It is
multi-platform compatible and has a back-end control panel.
About the Author:
http://www.theinternetone.net
Read more articles by: Danny Wirken
Article Source: www.iSnare.com |
|