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/