Solution to hotlinking
Is there a real solution for hotlinking? If anyone knows the solution, please share with us all. Why I say “real” solution? Because there are some solutions which partially solve the problem of hotlinking but at the same time it causes other problems. But before we proceed further:
What is hotlinking
Hotlinking is a process of linking directly to someone else image/pictures (on their server), thus consuming their bandwidth. If you are the victim, it’s impact is minimal on your bandwidth if there is only few hotlinkinks to your images, however if there are hundreds of hotlinks then you will see that your bandwidth is being eaten by other websites.
Another problem is, sometimes you do not want others to display your images on their blog without your consent. So, in this case, hotlinking equals to stealing.
How do you stop Hotlinking?
There is a way to stop hotlinking through .htaccess. Htaccess code for blocking hotlinkers will look something like this:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?adesblog.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|ico|js)$ /images/nohotlink.png [NC,R,L]
Why the above code doesn’t solve the problem? It does, but it also blocks all the other legitimate readers of your blog from viewing your images. Since RSS readers (like google reader) aggregate your posts into their interface, the above htaccess code will think RSS readers are hotlinkers too, therefore they all will be blocked from displaying your images.
So, if you put the above code, then your readers will be reading only texts of your posts. As for the images, they will be replaced by one image that you specify, in the above case it’s “nohotlink.png“. So all the images of your blog will be replaced by “nohotlink.png” in the RSS readers. That’s not good. So, the ultimate question:
How to solve this problem of hotlinking? While blocking all hotlinkers and allowing all RSS readers?
If you know the answer / have the solution for this problem, do enlighten us! We all will be grateful.
Link (for generating htaccess code for hotlink protection):
http://www.htaccesstools.com/hotlink-protection/
Related Posts
- IDEA: Image that contains built-in links
- Bidclix.com, advertising network is closing
- Invest in R&D, it’s vital for your business’ survival
- WP Plugin: reCAPTCHA, stop spam
- WP Plugin: all-in-one htaccess plugin
17 Responses
to “Solution to hotlinking”
2 Trackback(s)
- Aug 27, 2008: Some Link Love | Sha Money Maker
- Sep 22, 2008: Websites tagged "hotlinking" on Postsaver









By kuanhoong on Aug 7, 2008
Yes, I too faced the same problem with my images in the RSS reader. I am wondering whether there is a better solution to this.
By jialat on Aug 7, 2008
I am using this “hotlink protection” plugin, works well for me, it is from http://www.bahn-spass.de/2007/05/05/hotlink-protection/.
also, I heard that for some cpanel, we can actually set it to stop hotlinking, but I never try it before.
By Rajaie AlKorani on Aug 7, 2008
First of all, is there anyway to know if someone is hotlinking to your images in the first place?
By Cow on Aug 8, 2008
I suppose one way of doing it (though complex) would be to use a WordPress plugin to modify the URL of images (e.g. add something like ?from=rss onto all the image URLs) and don’t block requests with that string at the end. Of course, it doesn’t stop someone from hotlinking your images by including that string when they hotlink but 99% of people probably won’t work that out and the rest have to explicitly circumventing your hotlink prevention which many people will probably have moral objections to.
By BlogSavvy on Aug 8, 2008
Great post, again useful infomaation i’ve bookmarked you and will check back often.
By PS3 on Aug 8, 2008
Depending on the hosting package you use, the first you will probably know is when you get a friendly warning from your host about exceeding bandwidth…or at worse, they suspend the hosting for going over your allowance.
By Putera Emas on Aug 8, 2008
I can’t stop hotlinking, but I can save your bandwidth usage. Upload all your images to imageshack.us. Problem solved!
By Ps3 Gamer on Aug 9, 2008
Nice one! Hot linkers had slowed down my website due to bandwidth restrictions. Not any more thank you!
By Ades on Aug 10, 2008
Thanks jialat for the plugin, i will check that out.
By Paid Online Free Surveys on Aug 12, 2008
I have yet to encounter this problem, but in the case that I do… I am going to bookmark this page. Hopefully somebody comes up with a solution.
By Eliza J. on Aug 12, 2008
While researching for the solution, I get to know about this article http://htmlcenter.com/blog/hotlink-protection-with-php/ but I’m not sure if it helps as I’ve not tested it.
It was based on preventing hotlinking problem with this script -
Let me know if it helps.
By PowWeb Review on Aug 19, 2008
Yet another great post, one issue I often face is that I have made a couple custom graphics for affiliate programs that I am helping to promote which others feel that they can steal. I intend to simply change my image to something obscene every month of so while changing all my own references to the regular image, problem solved ;)
-Jim
By AlexL on Aug 21, 2008
hi! I’m beginner for blogging
how “hotlinking” look like?
i’m confuse here…
any one can help me?
By Ades on Aug 22, 2008
Alex, you can’t differentiate hotlinks unless you look into the source code of the page. But I am sure you would recognize your images if someone else has posted on their blog without your consent. If they do that, if the source of the image still points to your server, then they are hotlinking.
By Blog Hacker on Sep 1, 2008
I have faced this problem. Uploading them to imageshack might solve it, but i suggest in reducing the file size by converting to JPG.