Configure a custom static error page

XM Cloud lets you create and configure site-specific 404 page not found or 500 error handling pages. When an error occurs, visitors are redirected to one of these static error pages.

404 custom error pages are multi-lingual and are, by default, displayed in the context language of the website visitor. If a website visitor requests a page in, for example, Italian, but the page does not exist in Italian, they are redirected to a 404 page in Italian:

  • If a 404 page does not exist in the language requested by a website visitor, they are redirected to a 404 page in the default language of the website.

  • If a 404 page does not exist in the default language of the website, the website visitor is redirected to the standard Sitecore 404 page.

Note
  • Because of Next.js limitations, this solution is not supported in a multisite setting when using JSS.

  • If you're using JSS version 21 or later with Next.js and you enable the DISABLE_SSG_FETCH setting, the JSS app won't fetch 404 or 500 custom error pages.

To configure a custom static error page:

  1. Create an error page in a site.

  2. In Content editor, navigate to sitecore/Content/<site collection>/<site>/Settings .

  3. In the Error Handling section, in the Page not found link field or the Server error page link, insert a link to the custom error page.

    Insert a link to the error page
    Note

    If you have previously created the site in the Content editor, and you can't find the Error Handling section, you might have forgotten to select the Error Handling option when creating your site collection.

  4. Publish the site root item /sitecore/content/<site collection>/<site>, then on the Publish tab, click Publish > Publish item.

Do you have some feedback for us?

If you have suggestions for improving this article,