Seocheckout

How do you prevent hotlinking to images?



Write the reason you're deleting this FAQ

How do you prevent hotlinking to images?

Sometime back, I noticed an intense amount of bandwidth for one particular site and found out that one of my images was being hotlinked to. I changed the image name so it could not be hotlinked to anymore. And, enabled no right clicking on the page. Now I host images on other sites like tiny pic. Since then I haven't noticed a problem. Are there any other ways to prevent hotlinking to images?

Comments

Please login or sign up to leave a comment

Join
kyabaat
What do you mean by hotlinking an image ? Do you mean images which are pointing to other sites ? If yes, then you can always trim url or a href tag whenever user tries to post it How do you prevent hotlinking to images?



Are you sure you want to delete this post?

Beverly
What do you mean by hotlinking an image ? Do you mean images which are pointing to other sites ? If yes, then you can always trim url or a href tag whenever user tries to post it How do you prevent hotlinking to images?

For instance, let's say you are hosting images on your own server space (uploaded images) and others are using the jpg code to hotlink to them, rather than downloading the images and uploading to tinypic or other free hosting space. This can get very costly especially if you are being charged for bandwidth overage.



Are you sure you want to delete this post?

Tommy Matalino
I know there's a plug-in that can prevent this.
For example, if someone hotlink your images, a default image would show up, saying "NO HOTLINKING" or something like that. Or images won't load on other pages aside from yours.



Are you sure you want to delete this post?

Beverly
I know there's a plug-in that can prevent this.
For example, if someone hotlink your images, a default image would show up, saying "NO HOTLINKING" or something like that. Or images won't load on other pages aside from yours.


I love that idea! Thank you so much. Do you know if this plug in is available for Blogger or just Wordpress? I'm mostly into Blogger now. Though I also have a forum. I'll have to check to see if SMF has a similar plug in for their software. Thanks for this suggestion.



Are you sure you want to delete this post?

Tommy Matalino
I love that idea! Thank you so much. Do you know if this plug in is available for Blogger or just Wordpress? I'm mostly into Blogger now. Though I also have a forum. I'll have to check to see if SMF has a similar plug in for their software. Thanks for this suggestion.

I don't think it's available to Blogger as it is using Google's servers to host images. You won't get any problem on lost bandwidth.



Are you sure you want to delete this post?

Jolie
There are many scripts available that can prevent others from right clicking the page and that will prevent them from taking your images.



Are you sure you want to delete this post?

kyabaat
For instance, let's say you are hosting images on your own server space (uploaded images) and others are using the jpg code to hotlink to them, rather than downloading the images and uploading to tinypic or other free hosting space. This can get very costly especially if you are being charged for bandwidth overage.


okay. I guess to prevent overusage of bandwidth sites like imageshack and tinypic limit number of times a image or account can show it simultaneously.



Are you sure you want to delete this post?

echizen
If you're on self-hosted website running under Apache web server, you can edit your .htaccess file and add the code below to your .htaccess file (if using Wordpress, place after default Wordpress .htaccess code)

RewriteEngine on
# Allow blank referer
RewriteCond %{HTTP_REFERER} !^$
# Sites allowed to link your images. Add your other site here
RewriteCond %{HTTP_REFERER} !^http://(www\.)yourdomain.com/.*$ [NC]
# custom blocking images.
RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$ - [F]

to server alternate image (e.g. an image with special message/text), add this code and placed after above code
RewriteRule \.(gif|jpg)$ http://www.yourdomain.com/angryman.gif [R,L]


replace yourdomain.com with your domain name. replace angryman.gif with your alternate image name.

if you have any suggestion or improvement, let me know.



Are you sure you want to delete this post?

kyabaat
Can you please tell us what is the language in which you have shared the code ?



Are you sure you want to delete this post?

Tommy Matalino
There are many scripts available that can prevent others from right clicking the page and that will prevent them from taking your images.

There's still a way. Printscreen plus photoshop. Another way is the use of "Page Info" (Mozilla: Tools > Page Info > Media).



Are you sure you want to delete this post?

kyabaat
To addon you can use snipping tool ;)



Are you sure you want to delete this post?

Tommy Matalino
To addon you can use snipping tool ;)

How do these snipping tools work?



Are you sure you want to delete this post?

Beverly
How do these snipping tools work?


The tool lets you capture a portion of the page and save to hard drive or online at a bookmarking site.



Are you sure you want to delete this post?

kyabaat
How do these snipping tools work?


open snipping tool, and click on new. Once you click on it, you can select area to take screenshot and then save it.



Are you sure you want to delete this post?

Beverly
open snipping tool, and click on new. Once you click on it, you can select area to take screenshot and then save it.

I can't find this tool on my XP OS. But I remember the snipping tool being on my Vista. I use puu.sh now, they have a nice snipper tool. There are many others, I'm sure.



Are you sure you want to delete this post?

kyabaat
I can't find this tool on my XP OS. But I remember the snipping tool being on my Vista. I use puu.sh now, they have a nice snipper tool. There are many others, I'm sure.


oh oh.. My bad. I should have asked you about your OS. As you said, you are using XP you can use screen recorder or use snipping tool for xp, which you can download from http://xpsnipping.codeplex.com/ How do you prevent hotlinking to images?



Are you sure you want to delete this post?