homepage Welcome to WebmasterWorld Guest from 54.205.197.66
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
Block a site that only hotlinks my images
silverbytes




msg:3940413
 6:24 pm on Jun 25, 2009 (gmt 0)

I have hotlink protection allowing only certain sites to hotlink my images, however there is 3 or 4 sites (mostly forums or social networks) appearing in 404 error, mostly posts hot linking my images, what is annoying.
Is there anything else I can do to completely ban those?
Should I add an .htaccess line like

Deny from (IP)?

 

phranque




msg:3940774
 9:18 am on Jun 26, 2009 (gmt 0)

I have hotlink protection

how are they hotlinking?
or how are you protecting such that they can bypass the protection?

there are a ton of image hotlinking [google.com] threads on WebmasterWorld.

silverbytes




msg:3941123
 5:06 pm on Jun 26, 2009 (gmt 0)

they are linking images directly such as img="http://mysite.com/myimagebeinghotlinked.jpg" I'm not being bypassed by protrection, in fact the image don't show in their sites, but they still have the link there, and therefore I get the 404.

I sticky the protection code but on't want to post ideas about how bypassing the protection

Demaestro




msg:3941137
 5:21 pm on Jun 26, 2009 (gmt 0)

Don't serve a 404,

What I do it serve a "hotlink" image so that when they request /myimagebeinghotlinked.jpg they get served /anit_hotlinking_image.jpg

Then I make the anit_hotlinking_image.jpg a picture of my website with the url across it.
Or "Image Available at sitename.com"

Usually if you promote your site in the image it isn't long before they take it down.

MWpro




msg:3942289
 7:59 am on Jun 29, 2009 (gmt 0)

Then I make the anit_hotlinking_image.jpg a picture of my website with the url across it.
Or "Image Available at sitename.com"

I like this method, but question: when I do this, the anti-link image I serve up on the other website stays in the visitor's cache, and thus when they come to my site they still see the anti-link image and not the real image (until they hit reload). Any suggestions?

tangor




msg:3942294
 8:10 am on Jun 29, 2009 (gmt 0)

they still see the anti-link image and not the real image (until they hit reload). Any suggestions?

How would they see the same image? Arriving via browser to your site should cause the browser to read everything "new"! Unless I'm missing something, you'll be serving the real image to your site visitors, not the anti-hotlink image...

MWpro




msg:3942298
 8:18 am on Jun 29, 2009 (gmt 0)

that hasn't been my experience. Just tested in both Opera and Firefox.

tangor




msg:3942397
 11:48 am on Jun 29, 2009 (gmt 0)

Clear YOUR browser cache first, then try again, might be giving bad test results. Doesn't make sense that if presented with a DIFFERENT filename for the image the browser would show the undesired image...

Demaestro




msg:3942515
 3:17 pm on Jun 29, 2009 (gmt 0)

try putting the anti_hotlinking_image.jpg in a different directory from the real images.

That might give Firefox a new path and it may not cache it.

It really shouldn't be though if they have different names.

MWpro




msg:3942522
 3:33 pm on Jun 29, 2009 (gmt 0)

Yeah still no. Below is the code I'm using, maybe the problem is there?

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(www\.)?ebay\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?cgi.ebay\.com/ [NC]
RewriteRule \.(jpe?g¦gif¦png)$ images/nohotlink.gif [L]

edit: let me test that, Demaestro.

[edited by: MWpro at 3:34 pm (utc) on June 29, 2009]

silverbytes




msg:3942602
 5:34 pm on Jun 29, 2009 (gmt 0)

I don't like that method really because all hotlinkers sitll eat your bandwidth, affecting your site speed and even making you pay more in hosting bandwidth... don't you think?

Demaestro




msg:3942647
 7:38 pm on Jun 29, 2009 (gmt 0)

Depends on your hosting package I guess.

For me bandwidth is a non issue, images on sites with high traffic volume are hosted from a remote server so that image calls don't affect the sites' speed.

If Ebay is hot-linking images from your site don't you think having your site URL and a message in those images encouraging people to buy from you or visit you is worth it? I do.

silverbytes




msg:3944859
 2:37 pm on Jul 2, 2009 (gmt 0)

images on sites with high traffic volume are hosted from a remote server so that image calls don't affect the sites' speed.

I guess you are not talking about free hosting images right? Do they pay another hosting service just to place images there and leave the main hosting account with just html files?

Demaestro




msg:3944862
 2:41 pm on Jul 2, 2009 (gmt 0)

Do they pay another hosting service just to place images there and leave the main hosting account with just html files?

No, it's something my sys guy set up so that shared servers are snappy. He sits around all day and thinks this stuff up, it makes him happy.

edit... that rhymes by accident.

[edited by: Demaestro at 2:41 pm (utc) on July 2, 2009]

silverbytes




msg:3945059
 6:30 pm on Jul 2, 2009 (gmt 0)

How about this: is it possible to wrap a link around the image. Clickeable image instead one saying "visit my site"?

phranque




msg:3945215
 10:59 pm on Jul 2, 2009 (gmt 0)

if the browser is rendering an image tag and requests the url for the image it is expecting a response that is an image-type resource.
as soon as you respond with html, the Content-type of your response would be text/html rather than image/* so it won't render properly.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved