SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. 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 have followed Microsoft's instructions for custom 404 pages in SharePoint by setting the web application's FileNotFoundPage property. I am now still getting a 404 error if someone types a site collection name incorrectly. For example if the user goes to sharepoint/sites/test and "test" is not a site collection then they will still get a 404 error. I have tried catching this with a httpModule also, but it looks like the request is returning a 200 code instead of a 404.

Several of the blogs mention this same problem but I have not seen any solution for it.

This seems to be working within a site collection context only, i.e. http://MyMOSSServer/sites/siteA if sites is a wildcard inclusion managed path and siteA doesn't exist in MOSS then this URL will NOT trigger the custom 404 error page set to SPWebApplication.FileNotFoundPage property.


share|improve this question

As far as I know this is a design limitation in MOSS. I tried to do this myself a year or so ago and didn't identify a resolution at the time for showing a custom 404 if an invalid site collection name is specified.

Please see

"Note Because of a design limitation, the custom 404 error Web page does not work when you access invalid site collections."

share|improve this answer

Perhaps this blog post at might be helpful. (Full disclosure: I work at Sininen Meteoriitti, the company that employs the bloggers at Sharepoint Blues :-))


Eh, upon further inspection, it looks unlikely that this would actually work for 404 errors. My bad. >_<

share|improve this answer

I don't know if it's gonna be of any help, but if you're running IIS 7 you should check out Sites\Sharepoint - 80\ and then ".NET Error Pages" or "Error Pages"

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.