Could anyone explain me how should I change the default "Sorry, something went wrong" message to some other text or - even better - to change the content of this "component" to something custom?

Where should I look for the files (or where to put these and how to make SP use of these) on SharePoint side?


  • You can make a custom 404 page through the UI, not sure if it's the same as 2010 but in 2010 you creates a IHTTPHandler that checked for the error and handled it properly redirecting you to the new error page. I will check my 2013 box and if I find another way I will post an answer.
    – Hugh Wood
    May 23, 2013 at 16:14
  • Thanks for this. Actually, what I'd like to do is to keep the original 404 page and create custom one for page / web part errors ("Sorry, something went wrong" message) only. May 23, 2013 at 22:45
  • The iHandler method maybe your best bet then, there are plenty of easy to follow examples on google.
    – Hugh Wood
    May 24, 2013 at 8:13

1 Answer 1


You could replace error pages for WebApplication scope.

To replace custom error page you will need:

  1. Create application page for custom page (for ex. error.aspx) and place it to the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\1033\ directory (for english locale)
  2. Then if you prefer powershell run this script to map your page as web application custom error page:

    $site = Get-SPSite "{site url}" -Limit All
    $spWebApp = $site.WebApplication         
    $spWebApp.UpdateMappedPage([Microsoft.SharePoint.Administration.SPWebApplication+SPCustomPage]::Error, "/_layouts/1033/error.aspx")
  3. If you prefer code way you could use SPWebApplication.UpdateMappedPage method to map your page.

To get more information and examples check this posts:

How to customize SharePoint 2010 error pages

How to Customize Error Page, Page Not Found and Access Denied in SharePoint 2010

They describe solution for 2010 version but I think it should also work for SP 2013.

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.