Use varnish to avoid hot linking or image leeching
Posted on: 07/25/2011 09:13 AM

Go2Linux posted a guide about using varnish cache to avoid hot linking or image leeching

Use varnish to avoid hot linking or image leeching

The technology behind the World Wide Web, the Hypertext Transfer Protocol (HTTP), does not make any distinction of types of links?all links are functionally equal. Resources may be located on any server at any location.
When a web site is visited, the browser first downloads the textual content in the form of an HTML document. The downloaded HTML document may call for other HTML files, images, scripts and/or stylesheet files to be processed. These files may contain <img> tags which supply the URLs which allow images to display on the page. The HTML code generally does not specify a server, meaning that the web browser should use the same server as the parent code (<img src="picture.jpg" />). It also permits absolute URLs that refer to images hosted on other servers (<img src="" />).

This is good, if you own the server where the objects are stored, but if not, what you are doing is using someone else bandwidth.
And if somebody is using your bandwidth, you will not like it, and something needs to be done about it.
Well see now how to stop or prevent other from hot linking your content.
Block access to your media files from non authorized sites
Well use varnish, to block hot linking or image leeching.
This way, well block the bandwidth thief before he really reach our web sever.

Printed from Linux Compatible (