Welcome to WebmasterWorld Guest from 23.22.220.37

Forum Moderators: phranque

Message Too Old, No Replies

Block a site that only hotlinks my images

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 20, 2003
posts:1741
votes: 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)?

9:18 am on June 26, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


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.

5:06 pm on June 26, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 20, 2003
posts:1741
votes: 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

5:21 pm on June 26, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 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.

7:59 am on June 29, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 29, 2002
posts:533
votes: 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?

8:10 am on June 29, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:6142
votes: 280


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...

8:18 am on June 29, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 29, 2002
posts: 533
votes: 0


that hasn't been my experience. Just tested in both Opera and Firefox.
11:48 am on June 29, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:6142
votes: 280


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...
3:17 pm on June 29, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 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.

3:33 pm on June 29, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 29, 2002
posts:533
votes: 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]

5:34 pm on June 29, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 20, 2003
posts:1741
votes: 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?
7:38 pm on June 29, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 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.

2:37 pm on July 2, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 20, 2003
posts:1741
votes: 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?

2:41 pm on July 2, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 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]

6:30 pm on July 2, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 20, 2003
posts:1741
votes: 0


How about this: is it possible to wrap a link around the image. Clickeable image instead one saying "visit my site"?
10:59 pm on July 2, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


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.