Hotlinking is a term used when an image from your site used in other site without changing its URL. The main disadvantage of hotlinking is your bandwidth used on another website. So ultimately it creates load on server.
To understand hotlinking you may assume any image with URL
http://www.blogtechnika.com/wp-content/uploads/2009/12/wordpressmonitor.jpg
Suppose any other user upload this picture and instead of hosting this image to his own site he link the image to its original URL then whenever the image will open it use bandwidth of Blogtechnika instead of his site. So it will effect the speed of server. Sometimes it may effect the load time of your website.
You can prevent hotlinking of your website by using .htaccess method. You can also check my previous article on .htaccess method on How To Restrict WordPress Admin Use By IP Address.For those who don’t know about .htaccess files please refer to my previous article.
1) Create a small image of any format, telling no hotlinking please.
2) Check the root folder of your blog. If there is any .htaccess file then open it on any text editor. Now copy and paste a code on .htaccess file .
RewriteEngine On
#Replace ?mysite\.com/ with your blog url
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Replace /images/nohotlink.jpg with your "don't hotlink" image url
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
Now load this file to the root folder of your blog. All done.
via Wprecepies
Subscribe to blogtechnika for more updates. Follow me on Twitter @techim.
Related posts:
- How To Allow Some Sites For Hotlinking Images(If You Prevent Hotlinking by .htaccess)
- How To Restrict WordPress Admin Use By IP Address
- How to make a Favicon for blog and upload it into root directory
- Secure Your WordPress By Installing WordPress File Monitor Plugin
- How To Generate Sitemap And Add It To WordPress Blog
{ 15 comments… read them below or add one }
Ya hot linking will create unnecessary burden to server,it will defiantly restrict hot linking thanks for info.
good post himanshu, i really don’t know much more about this but now i understand thanks for sharing
.-= MostlyBlog´s last blog ..Top 10 Newest Touchscreen Mobile Phones of 2009 =-.
good ploy .. i have subscribed yr blog with google reader and you have full feeds in it .. but there is no images displayed in posts … so i feel if your google reader subscriber will have problems.
but hot-linking will reduce your server burden for sure
.-= Jaspal´s last blog ..100+ facebook apps for productivity and tools for achieving all your goals =-.
I am also not able to see images of Blogtechnika in Google reader.
.-= Pascal´s last blog ..Free Worpress.com to Self Hosted Wordpress.org Migration: =-.
Thanks for notifying me, now the problem is solved.
would help everyone if you explain how you solved it!
.-= Raju´s last blog ..How to Embed Google Wave in Your Blog/Website? =-.
@Raju Please check the latest post http://www.blogtechnika.com/how-to-allow-some-sites-for-hotlinking-images-prevent-hotlinking-by-htaccess
Thanks for subscribe to Blogtechnika, and really thanks for notify me about the problem, Let me check and figure out the problem. Thanks once again.
Himanshu this method is correct but will not work in most of the cases as people have mentioned above. So try to make sure you add a parameter for feed readers and gmail….
.-= Harsh Agrawal´s last blog ..How Mobile Phone Turned into SmartPhone =-.
I have two blogs. Example A & B. If my blog A has some images. It has been hot linked by B. If i did what you said here in my A blog , then Images won’t appear in B? Isn’t it? Is there any way give relaxation to my own blogs from this restriction?
.-= Pascal´s last blog ..Free Worpress.com to Self Hosted Wordpress.org Migration: =-.
Great work Himanshu, thanks for sharing. I was not aware about it .
.-= Ruchi´s last blog ..Site Performance Feature added in Google Webmasters Labs =-.
I was not aware of this and what you said is really corret .. will update my htaccess right away.. Thankd for the share
.-= Rajesh Kanuri´s last blog ..WordPress 2.9 Beta 2 is Available: Download & Explore =-.
Simple enough! Nice tip on how to prevent hotlinking!
I wish there is a way to punish violators. Oh, what fun…
.-= Gabe | freebloghelp.com´s last blog ..10 FREE killer WordPress themes in 2009 =-.
Informative stuff, I have never thought of this hotlinking concept. In fact I did use this type of hot linking when I was at blogspot, but now I’m using my own server though.
Any ways that’s for the awesome article. I was also cautioned by Gagan (beepthegeek) but didn’t understand what he said at that point of time, and now its clear to me.
i have hotlinked my site, but sometimes it will restrict others to use my images and in some case it wont, what to do. sometimes ppl can get the images, so iam always renameing the image link in particular period and its a burdern to me.
.-= sriganesh´s last blog ..60 Cute Mascot Characters =-.
{ 1 trackback }