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

Is it possible to have IIS (6 or 7.5) return a 404 Not Found (instead of 403 Forbidden) when a disallowed directory listing is requested?

A security scanning service I use thinks the 403 is revealing something "potentially sensitive", when in fact it's just not a valid URL. My workaround is to drop a default.aspx into each directory that returns an empty 404 page, but there has to be a better way...

share|improve this question

1 Answer 1

Sure. Configure a custom error message for 403.14 to run a simple ASP page that returns a 404 response code. 403.14 is the Status and subcode used for 'Directory listing denied'.

share|improve this answer

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.