SEOClerks

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?

Order Now
Process Time: 0.63377594947815

Possible Duplicate queries found!
MatchCountSQLScript
SELECT * FROM members_ledger WHERE ip = ? AND added>=unix_timestamp(NOW())-864001SELECT querystring, added FROM members_ledger WHERE ip = ? AND added>=unix_timestamp(NOW())-86400

/opt/clerks-staging/docroot/include/functions/includes/security.php 398 fetchMemberLedger() include_once()

SELECT * FROM `questions` as q JOIN categories_faq as c ON q.catid=c.CATID WHERE (q.status=1 OR (q.status=2 AND userid='') ) AND q.quesid='11331'1SELECT q.*, c.seo as CatSEO, c.name as CatName, c.parentid FROM `questions` as q JOIN categories_faq as c ON q.catid=c.CATID WHERE (q.status=1 OR (q.status=2 AND userid='') ) AND q.quesid='11331'

/opt/clerks-staging/docroot/viewfaq.php 496 () ()

SELECT * FROM seoclerks.members WHERE USERID='147'1SELECT * FROM seoclerks.members WHERE USERID='147'

/opt/clerks-staging/docroot/include/functions/includes/member.php 445 GetAllUserDetails() ()

SELECT * FROM seoclerks.members WHERE USERID=1471SELECT googleplus_profile FROM seoclerks.members WHERE USERID=147

/opt/clerks-staging/docroot/include/functions/main.php 16914 GetGooglePlusProfileFromId() ()

SELECT * FROM ratings_faq as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=11331 LIMIT 51SELECT m.username FROM ratings_faq as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=11331 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM answers a, seoclerks.members b WHERE a.quesid='11331' AND a.userid=b.USERID and b.status='1' AND a.status=1 ORDER BY a.combined_votes DESC, a.date_answered asc1SELECT a.answer, a.USERID, a.upvotes, a.downvotes, a.ansid, a.parentid, a.combined_votes, a.date_answered, b.username, b.userlevel, b.profilepicture FROM answers a, seoclerks.members b WHERE a.quesid='11331' AND a.userid=b.USERID and b.status='1' AND a.status=1 ORDER BY a.combined_votes DESC, a.date_answered asc

/opt/clerks-staging/docroot/viewfaq.php 1245 () ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50968 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50968 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50969 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50969 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50970 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50970 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50971 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50971 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50972 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50972 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50973 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50973 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50974 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50974 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50975 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50975 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50976 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50976 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50977 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50977 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50978 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50978 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50979 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50979 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50980 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50980 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50981 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50981 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50982 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50982 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50983 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=50983 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

UPDATE questions SET total_views = total_views + 1 WHERE quesid='11331'1UPDATE questions SET total_views = total_views + 1 WHERE quesid='11331'

/opt/clerks-staging/docroot/include/functions/main.php 1765 update_Faqviewcount() ()

SELECT * FROM questions WHERE quesid!='11331' AND status='1' AND (question like '%How prevent hotlinking images?%' OR question like '%prevent%' OR question like '%hotlinking%' OR question like '%images?%') -- ORDER BY RAND() LIMIT 151SELECT quesid, question, seo, userid FROM questions WHERE quesid!='11331' AND status='1' AND (question like '%How prevent hotlinking images?%' OR question like '%prevent%' OR question like '%hotlinking%' OR question like '%images?%') -- ORDER BY RAND() LIMIT 15

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() ()

SELECT * FROM seoclerks.members WHERE USERID='632' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='632' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='17130' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='17130' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='17031' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='17031' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='43' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='43' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='10642' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='10642' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM members_ledger WHERE script='/opt/clerks-staging/docroot/viewfaq.php' AND querystring LIKE '%id=11331%' AND added>=UNIX_TIMESTAMP(NOW())-1200 GROUP BY USERID 1SELECT USERID, username FROM members_ledger WHERE script='/opt/clerks-staging/docroot/viewfaq.php' AND querystring LIKE '%id=11331%' AND added>=UNIX_TIMESTAMP(NOW())-1200 GROUP BY USERID

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() ()

SELECT * FROM categories1SELECT * FROM categories

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() parseRedundantQueriesCache()

select * from categories_software order by name asc1select * from categories_software order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_GetSoftwareCategories()

select * from categories_wanttobuy order by name asc1select * from categories_wanttobuy order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_wantcategories()

select * from categories_wanttotrade order by name asc1select * from categories_wanttotrade order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_tradecategories()

SELECT * FROM seoclerks.members WHERE USERID='147.jpg'1SELECT profilepicture FROM seoclerks.members WHERE USERID='147.jpg'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='43.jpg'1SELECT profilepicture FROM seoclerks.members WHERE USERID='43.jpg'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='3638.png'1SELECT profilepicture FROM seoclerks.members WHERE USERID='3638.png'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

select * from categories_faq order by name asc1select * from categories_faq order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_GetFaqCategories()

Invalid SQL

count(*)sql1error_msg

Expensive SQL

Tuning the following SQL could reduce the server load substantially
LoadCountSQLMaxMin

Suspicious SQL

The following SQL have high average execution times
Avg TimeCountSQLMaxMin
0.3149461SELECT count(A.PID) as total from posts A , seoclerks.members C WHERE A.active=1 AND A.USERID=C.USERID AND A.sold_out=0 AND A.USERID=C.USERID AND category IN (37) AND gtags like'%City%' AND type !=99 0.3149460.314946