I want to configure a custom 404 page for my SharePoint 2010 environment.

My first task was to create a custom 404 page (htm). and save it under c:\inetpub\custerr\en-US\404Custom.htm

After this I edited the 404 entry from my IIS (Picture) and run a iisreset. enter image description here

But when I want to open a SharePoint site, I getting a eror message that the path is not correct (Picture 2). So I changed the path to %SystemDrive%\inetpub\custerr\\404Custom.htm

enter image description here

But it doesn´t work!

Why says my IIS that my path ist bad?

(By the way, I don´t found a way to set the "Entry Type" back to Inherited so I removed the custom error entrys from the web.config. And all works fine and the GUI shows Inherited.)

  • I followed Microsoft's instructions at support.microsoft.com/kb/941329 ("How to point to a custom 404 error Web page in SharePoint") and got negative results. My environment's factors are: * A single public SP 2010 server. * This server has a Web application hosting host-named site collections. * I wish to apply the custom 404 page to one of the site collections. I even applied the steps in kb941329 to our SP 2010 development server, specifically, to a Web application not hosting host-named site collections and got negative results. I don't want to apply the steps here to the Web applic – Willy Jan 15 '13 at 17:55

I'd take a look at the following: Sharepoint 2010 Custom Error Pages

I don't think there's a need to do anything, but leave the pages alone in IIS.

  1. Place your custom error pages in the custerr directory
  2. Edit the web.config file for your webapp(s)
  3. Update the customErrors node to include your custom pages
  4. Update the httpError node to turn on custom errors
  5. IIS Reset

I haven't actually tried this myself in 2010, but I didn't think it was necessary to edit the web.config file manually these days. AFAIK, SharePoint Foundation does not support the custom error pages that are typically used in IIS sites.

Check out this post by Todd Carter.

You could use a feature receiver to deploy a custom error page into the SharePoint root folder (e.g. 14\TEMPLATE\LAYOUTS\1033\customerrorpage.html), then update the SPWebApplication.FileNotFoundPage property with a relative path to your file.

Using the feature you could then turn the capability on and off. Give it a go and let us know how you get on!

EDIT - this MS KB article is probably what you are looking for. As you would expect you can also use PowerShell to set the FileNotFoundPage property.

  • This is the correct answer. You do not want to get in the habit of customizing IIS on your SharePoint web front ends because you must manually maintain these configurations across each WFE in your farm. If you do it via the SharePoint framework, then your changes are captured in your SharePoint configuration and will be automatically synchronized to all WFEs as you apply them. – tyshock Jan 24 '14 at 16:09
  • I just tried steps in this KB on 2010 and it doesn't work. URL becomes "mysite/_layouts/spsredirect.aspx?oldUrl="...." – IrishChieftain Aug 12 '14 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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