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

I know how to set expires headers for whole directories, but how do I set an expires header for an individual file - e.g. the favicon.ico file in the root directory?

share|improve this question
up vote 1 down vote accepted

It appears that you need to use a custom developed HttpModule to do this. Here is a similar question from StackOverflow about this. It doesn't look like there is anything built in.

IIS7: Setting far future expires header on specific files

share|improve this answer
Man, in IIS6 it was easy! – Mark Henderson Mar 26 '10 at 2:03

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.