Sharepoint 2010 – Custom Error Pages

Unless you love the default Sharepoint error pages for 404 (not found) and 401 (access denied), it is usually a good idea to change them. The steps are a bit different than a standard application.

1) Browse to C:\inetpub\custerr\

2) You should now see a list of localization folders like en-US or fr-FR. Open the folder you want to edit and modify the error pages for 401,403,404 and 500.

3) Now browse to C:\inetpub\wwwroot\wss\VirtualDirectories\ and open the folder associated to the Sharepoint site you would like to affect.

4) Edit the file web.config and find the keyword customErrors. Replace the complete customErrors code block with:

1.<customErrors defaultRedirect="404.htm" mode="On">

2.       <error redirect=“401.htm” statusCode=“401” />

3.       <error redirect="403.htm" statusCode="403" />

4.       <error redirect=“404.htm” statusCode=“404” />

5.       <error redirect="500.htm" statusCode="500" />


5) Now find the keyword <system.webServer>. Inside this block, place the following block code. (If the httpErrors block already exists, replace it completely!)

1.<httpErrors errorMode=“Custom” existingResponse=“Auto”>


6) Save web.config and do the usual iisreset command if needed.



One thought on “Sharepoint 2010 – Custom Error Pages

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s