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

Webmaster General Forum

Efficient way to change image file names
To stop hot linking?

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

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?



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

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.


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

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?


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

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?


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

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


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

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?


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

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.


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

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.


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

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.


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

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.


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

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

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