Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone have an idea of what's the impact on a website performances when activating Hotlink protection on server.

FYI: hotlink protection disallows other websites on other servers to place an image on their websites that directly refers to my websites. For instance let's say is including an img file called test.jpg, can NOT place in its pages this line:

<img src=""> 

because server would recognize that such request is not coming from and stops the request, therefor woudl display nothing in place of the image.

Actually my websites on which I activated Hotlink protection do not seem to run slower. But I'm just wondering waht's behind it, I suppose Apache web server needs to check for every request for an image and see where such request comes from, so in some way it should decrease performances.

share|improve this question
up vote 0 down vote accepted

HTTP requests have a header field called "Referer". This is simply the URL from which you made the current request. This field is sent by browsers on most requests. (There's no referer if you typed a URL in the address bar. And you can configure your browser to not use one, or to fake one...) The hotlink protection you mention simply checks if the referer value is from a different domain than yours, and blocks or redirects the request if that's the case.

So, yes, there's obviously some overhead involved in making this check. But probably not huge. (I honestly can't say) I'd recommend you just pay attention to the server resource usage.

share|improve this answer

Apache is going to check where every request comes from anyway (since it has to be able to send it back), so hotlink protection will definitely not hurt performance.

share|improve this answer
Not sure about that. How is hotlink protection implemented? Likely it's using mod_rewrite in a .htaccess, there is definitely some overhead there, even if it is very small. – davr Feb 23 '10 at 23:20
True, but the performance gain of sending a tiny image (or none at all) vastly outweighs that quick operation. – Beep beep Feb 24 '10 at 1:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.