Every now and then somebody builds a web site with the brilliant idea that they will uses images from other peoples' web sites as part of their content. They enjoy the benefits of the traffic (for example, advertising revenue), while the image owner ends up paying for the bandwidth. This is called image leeching.
What can you, as a web site owner, do about this?
If you're running a good web server, e.g. Apache, then you can block all requests to images from browsers which specify a referring site other than your own. In your .htaccess file, you can add a rewrite rule something like this:
RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^https?://www.example.com/.*$ [NC] RewriteRule .*\.gif$ - [F]
This forces all requests for .gif files to fail ([F]) if the page in which the image is embedded (given to us as the Referer: (sic) in the HTTP request) is neither blank nor matches www.example.com. Refer to the Apache URL Rewriting Guide for more details.
Blocking traffic is really no fun at all. Instead, why not enjoy yourself at the other web site's expense?
For example, at once time you could have clicked on an icon which included the word sex on a now defunct website called iconsurf.com that linked to our website.
We looked at where you were coming from in our .htaccess file, and if you were coming from iconsurf.com gave you a more interesting icon:
# Give iconsurf.com visitors something interesting to look at # Note: due to a bug they often ask for //favicon.ico instead of /favicon.ico RewriteBase / RewriteCond %{HTTP_REFERER} iconsurf [NC] RewriteRule favicon\.ico$ image_leeching.ico [L]
Then, when you arrived, we re-directed you to this page:
# Note the checks for the rewritten URI to prevent looping RewriteCond %{HTTP_REFERER} iconsurf [NC] RewriteCond %{REQUEST_URI} !^/image_leeching.ico$ RewriteCond %{REQUEST_URI} !/resources/image_leeching RewriteRule !favicon\.ico$ https://www.albionresearch.com/resources/image_leeching [R,L]
With this combination of techniques, you can display what you like on the other site's page and, if they link to you, redirect any inbound traffic to the page of your choice.
In 2021 we had to change the name and wording of this page: search engines had become more prudish, and our old title apparently caused this page to have a not-safe-for-work classification.
Can we suggest you look at some of the companies we use?
Virtual private servers from as little as $4 per month. We use them for serious apps as well as simple web sites.
$200 credit for first 60 days if you use the above link.*
You can also rent a server by the hour just to test an idea.
Note: the above are affiliate links to companies we use. Using these links helps pay for this page.
*January 2025. Not sure how long this offer will last.