I am using Sitecore 8.2 along with SXA. We have 404 and 500 custom error pages configured in Sitecore. 404 custom error page is working but I am unable to get 500 custom friendly error page whenever server error gets thrown. Instead a server error page with stack trace gets thrown. Does anyone have any suggestion to make custom 500 error page being displayed when an internal server error occurs.

  • Do you have <customErrors mode="On" /> in your web.config?
    – Marek Musielak
    Aug 17, 2018 at 11:50
  • i just checked..it is 'off' in web.config as follows: <customErrors mode="Off" defaultRedirect="500" /> I can make mode="On" but I am not sure what absolute/relative url to put in defaultRedirect as we do not have any .cshtml view in my project. We have 500 page as content page in sitecore
    – Rachit
    Aug 17, 2018 at 11:55
  • Can you try to replace your customerrors tag with <customErrors mode="On" /> without any defaultRedirect?
    – Marek Musielak
    Aug 17, 2018 at 12:02
  • Hi Marek, No success yet....i tried using customErrors tag without any default redirect in web.config <customErrors mode="On" /> but it shows server error page only instead of custom error page. Pls suggest
    – Rachit
    Aug 17, 2018 at 14:07

3 Answers 3


Assign 404 and 505 pages in your settings, by selecting the relevant pages by going /sitecore/content/{Environment}/{DemoSXASite}/Settings/ in the "Error Handling section"

enter image description here

For the 500 page you have to do a little trick, once you have designed the pages completely.

  • go to /sitecore/content/{Environment}/{DemoSXASite}/Settings/Site
  • Grouping/DemoSXASite Select the tab from top navigation "ERROR HANDLING"
  • Click on Generate static page.

enter image description here

Here is my blog link for reference, And don't forget to publish full site once done.

  • Can you also add that the page must already be linked on the settings item before you generate the static page? Aug 17, 2018 at 14:31
  • Hi, I have followed this step and clicked on 'Generate static error page'. After that i will publish whole site. Do i need to do any more step like editing my web.config and changing customError tag to <customErrors mode="On" />. Currently customError tag is: <customErrors mode="RemoteOnly" />
    – Rachit
    Aug 17, 2018 at 14:34
  • If that did not work try <customErrors mode="RemoteOnly" /> this is what I have configured and that works fine @Rachit Aug 17, 2018 at 14:36
  • @MichaelWest In this question, I assumed that the pages are already setup, because the 404 page was working. so It would be unnecessary. I have share a reference link for that too. Aug 17, 2018 at 14:37
  • Hi michael, my 404 and 500 pages are already linked correctly in Error Handling section in Settings.
    – Rachit
    Aug 17, 2018 at 14:38

@Rachit, I got same error when I tried to generate static error page. After looking at logs, the sitecore is actually trying to use the Content Management URL for 404 and 500 error pages which caused the error message "Error page did not load. Make sure you published your content."

To successfully generate error page, please make sure you login to CM via the tenant site host name for example: sxasitename.sxa.com/sitecore. If you use only sxa.com/sitecore to generate the error page, you will get errors.

After generated error pages, you can find static html error page under your root path such as C:/inetpub/wwwroot/[yourinstance]/ErrorPages/SXASiteName.html

  • A little unrelated - but is there any config in addition to it adding the file to that location? We were trying to deploy it to other environments so I'm wondering if I just need to push the file, or if there's either file or database config that goes along with it.
    – Jen
    May 1, 2019 at 4:22

I did exactly the same steps as mentioned above but the 500 Static Error Page was not getting generated. I found that apart from the above steps, we also have to make sure that the CD Site is running over HTTPS

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.