In the world of SEO, one of the most despite characters most of use encounter is the hotlinkers. Hotlinkers are persons who, rather than hosting their files directly to their site, use another site owner’s binary content and host their files there. It can be annoying, especially when those hotlinked files start to populate your site’s server, hence your uptime statistics become greatly reduced and your incoming traffic is hampered from getting through. Thus, it is important that you learn how to protect yourself from them.
First, you must know that hotlinking is a form of compliment on your end. This only means that your website is popular because you provide your audience with quality content. However, you can’t always be toppled over by pesky rats who want to ruin your business, right? Then here are some ways to prevent them from infiltrating your site.
Perhaps the easiest way to prevent those hotlinks from coming into your site is by regularly changing the names of the files you use on your site. As part of your maintenance program, you should rename your images, flash files and .mp3s so that they would not easily be hotlinked, otherwise they become vulnerable to hotlinkers. You can use a script to do this for you to make things easier. It is also great to constantly change the location of your files so that they would not be caught by hotlinkers.
Another common way to solve this bandwidth leeching issue is by using certain programs in your server. To those who are using an Apache server, you can make use of the Rewrite Engine to prevent those hotlinks from coming in.
Script solutions meanwhile are becoming more popular today since they produce more effective results as compared with server solutions. There are also ready-made scripts available on the web which you can use to stop those hotlinkers from eating your bandwidth, and from there you can once again enjoy you uptime and bandwidth. You should, after all, you’re the one paying for the hosting service.
Through scripts you can also play with the hotlinks and get back at those people who have ridden on your site’s bandwidth. Here’s how:
Image Hotlinkers
The most common item used in hotlinking content are images, so it is best to learn how to treat them first before anything else. What you can do here is replace the image hotlinkers are using with the images you use to advertise your site. Try to make an image with a tag line that says “go to www.example.com to see the image.” Then you rename the file hotlinked.jpg and add it to your server. Now, using you .htaccess file, add this code:
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://mydomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ hotlinked.jpg [R,NC]
Music Files
Another commonly hotlinked files that eat up your bandwidth are music files. There are site users which jack your own music files to host their MySpace pages and other social network sites. Well, you can retort by creating an audio advertisement promoting your site and add it into a special .mp3 file called hotlinked.mp3, then place the code in your .htaccess file.
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://mydomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC] RewriteRule [^hotlinked].(mp3)$ http://www.mydomain.com/hotlinked.mp3 [R,NC] Top of Form
Flash Files
Finally, Flash files have also grown notorious as they are used by hotlinkers. In this case, you have two ways in removing them and placing the files with your own. The first option is by using the getURL() method found inside the flash file and redirect the address of the user to your own site. The process becomes the other way around: you now hijack your hotlinker’s site rather than having yours hijacked. Create the flash file and have it named hotlinked.swf. Another method is by using the same technique done in the images so that it would show a different flash file showing your ads. Either way, you must still add this script in your .htaccess file.
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://mydomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com$ [NC] RewriteRule [^hotlinked].(swf)$ http://www.mydomain.com/hotlinked.swf [R,NC]
If all else fails however, you may want to contact the host provider the supports those hotlinkers and tell them that you’re getting so annoyed with their hotlinks and that you want them to stop bugging you. Let them know the exact problem you are suffering from those hotlinks, and ask for server solution to prevent further hotlinks from coming in.
One thing to remember though: while preventing these hotlinks to penetrate into your site, you may also tend to block legitimate link-building offers which may be of great help to your business. However, the decision is always on your hands, and you know better in giving the things your site needs.
Author : Mary Winston, writer and editor, coordinator for RankTopTen.com
She has extensive experience in writing articles, essays, and reviews. She adores to rank multitude of stuff including people and brands, films and TV shows, music and entertainment, sports and lifestyle. Details of note have been extracted and distilled down to a simple yet refined “Top 10” formula that reflects the essence of things at their best.
I am on shared hosting and I have unlimited bandwidth. Do I still need to worry about these hotlinkers? Please reply.
Yes you can do that. It will avoid unnecessory bandwidth consumption and slowing down of your website.
I am using Amazon AWS and it charged on the basis of data uses. So hotlink protection is very important.
Yes very true Glen.
Thanks for your comment though.