Forum Moderators: Robert Charlton & goodroi
rewritecond %{HTTP_REFERER} !^http://(www\.)?example\.com [NC]
rewriterule \.(gif|jpe?g|png)$ - [NC,F]
Block them in robots.txt from indexing your images in the first place.
If you don't want hotlinking from a search engine, why let them index the images?
Hasn't that been entirely replaced by snapshots?
if you allow them to index then whatever else they do with the image, including hotlinking, is kind of fair game as long as it's used to promote your image.
Snapshot, thumbnail, whatever you call it so long as it's cached.
I just blocked all direct (no referrer) requests besides some known bots.
Then you are blocking a huge amount of valid users. Almost all browsers can turn off referrers nowadays, plus the list I gave in one of my posts above.
Google Preview is an entirely different issue.* What if your site depends on visitors who need sites-with-pictures-of-X? Ordinary humans don't use Preview for that; they use image search.
Except most users don't know what a referrer is and barely understand a COOKIE. The mass populations often doesn't even know what an Internet Explorer or a Firefox is and thinks their Google start page is the internet.
I've been blocking images for blank referrers for many years without any complaints.
obviously it doesn't need to index my image files in order to produce the snapshot
The original post was a question about image search.
Is it safe to go ahead and block images from displaying if there is no referrer?
Then you are blocking a huge amount of valid users.
There are so many variations on referrer behavior from browsers, that if you are within 20-30% of reality you are doing good.
If your log file will allow you to do it, throw out everything but the first visit for any user. Only use those referrers. That will give you the most accurate account.
Other things that will throw off referrers:
- some browsers will only send the root domain for any site.
- some browsers and proxy servers will repeatidly send an external referrer for EVERY page it visits. If it comes in from Google, and they visit 20 pages, all 20 pages could see that same google referral string sent.
- Most clued in Opera users turn off referrals as a security precaution. Mozilla may have an option to do the same soon. They are arguing about it now.
- I have heard that there is a version of msn IE that will not report an external referral under some security settings (not sure, but the pattern fits).
- Revisits. If a page is reloaded, some browsers will sent that page itself as the referral. hence, the high proportion of www.mysite.com in your logs.
- no cache mania. Most of the dsl, cable, and other high speed modem manufactuers are telling people to turn off caching in their browser. They all have explicit details on their site as one of the setup steps to take. That in turn is skewing referral numbers as even a simple back button can cause a page reload. That referrer will often be the previous page.
It's been my experience that 50 to 75% of insite referrals are not correct. Bookmarks, typed-it-ins, drop down history from address bar, caching, no caching, and reloads have turned insite referral numbers to junk. There are no major log file analyzers that have this fact figured out.
[webmasterworld.com...]
What percentage of users use browsers that don't send referrer data at all?
All the current up-to-date major browsers can be set ...
A visitor uses their browser's bookmark/favorite to access your site, thus sending no referrer.
[edited by: keyplyr at 2:02 am (utc) on Feb 7, 2013]
Is it safe to block hotlinking when there is no referrer?