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.


3 Answers 3


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 http://support.microsoft.com/kb/941329:

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


Perhaps this blog post at SharepointBlues.com 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. >_<


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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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