Welcome to WebmasterWorld Guest from 54.163.35.238

Forum Moderators: phranque

Message Too Old, No Replies

Efficient way to change image file names

To stop hot linking?

     

dickbaker

3:56 am on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The number of hot links to images on my site has really grown. I don't need any more drain on server resources.

However, I have somewhere between 1500 and 2000 images on my site. Even though DreamWeaver would redo the links to them, renaming them one by one would take forever.

Is there a more efficient way to do this, or do I just sit down for an entire day and rename files?

phranque

7:07 am on Jun 10, 2010 (gmt 0)

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



set up a RewriteRule in your .htaccess:
- if the request is an image file
- if a Referer request header is provided
- if that referrer is not your domain
- 403 GFY

this won't catch unreferred hotlinks but it also won't forbid visitors who don't/can't provide Referer HTTP request headers.

Drag_Racer

8:17 am on Jun 10, 2010 (gmt 0)

5+ Year Member



Are all your images in folders? If that be the case, you could just change the folder name and adjust Dreamweaver to coinside.

Is that a possibility?

dickbaker

2:56 pm on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks. Both seem like good solutions.

The one thing that's nagging at me is whether hot links provide any link value for Google.

Any ideas?

topr8

4:00 pm on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



>The one thing that's nagging at me is whether hot links provide any link value for Google.

i'm not sure, but i've a feeling it might, or it might in the future with an important engine, it feels like a vote in the spirit of the original page ranking idea to me.

OT - do you set the expires header into the future for images, this can cut down the calls to the image and save processing.

chadman37

4:29 pm on Jun 10, 2010 (gmt 0)

5+ Year Member



the one thing for sure i totally agree with the idea of hotlinking will matter, may matter more than we know now but will matter quite a bit more in future. have you tracked where these hotlinkers are coming from?

dickbaker

9:40 pm on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't had the time to track anywhere near the total number, but I know a lot of them come from niche-related forums. More often than not, forum members will post a link to the page that features the product, but others will link just to the product photo.

I have no way of measuring the value (or no value) of hotlinking, but my gut tells me that it could be regarded as some sort of vote for the site. After all, the SE doesn't know if the photo is original or not.

dpd1

12:33 am on Jun 11, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



In my experience, I thought it was more trouble than it was worth... So I just turned on hotlink blocker. Virtually 99% of it was just people looking to make some point in a forum, and they just wanted to use any old photo to do it. If people really want to suggest a product, they put the link to the page. Only drawback is that I can't even post just a photo myself, so I have to use a separate server space for that. I tried to fix it so only some of my domains blocked, but it screwed everything up. So I just blocked all of it.

d3vrandom

3:32 am on Jun 11, 2010 (gmt 0)

5+ Year Member



I think any and all inlinks will help your site's ranking in google. You may even get some traffic from google's image search.

Organic links from forums are definitely worth having. I suggest you upgrade to better hosting. Hosting is cheap these days.

Sgt_Kickaxe

11:26 am on Jun 15, 2010 (gmt 0)

WebmasterWorld Senior Member sgt_kickaxe is a WebmasterWorld Top Contributor of All Time 5+ Year Member



Definitely return 404 error codes whenever someone attempts to load the image onto another domain. .htaccess does this extremely well, some great threads on it exist in the apache web server forum.

phranque

11:43 am on Jun 15, 2010 (gmt 0)

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



a 404 Not Found [w3.org] is suitable for the task, but a 403 Forbidden [w3.org] response is more precise.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month