---
title: "Generate a custom static error page"
slug: "generate-a-custom-static-error-page"
abstract: "Link to custom error pages."
---
# Generate a custom static error page

SXA lets you set site-specific 404 and 500 pages. When an error occurs, visitors will be 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.

To generate a static error page:

1. Create your error page(s).
2. Publish the error page(s).
3. Navigate to *sitecore/Content/<site collection>/<site>/Settings* and in the **Error Handling** section insert the links to your custom error pages.

    ![SXA-error.PNG](https://doc.sitecore.com/api/markdown-image/xp/en/developers/sxa/105/sitecore-experience-accelerator/images/SXA-error.PNG)

    > [!note]
    > If you cannot find the Error Handling section, you may have forgotten to select the Error Handling option when creating your site collection.

4. Navigate to */sitecore/Content/<site collection>/<site>/Settings/Site Grouping/<site>* and in the ribbon, on the **Error Handling** tab, click **Generate static error page** and click **Ok**. Now for every error that cannot be handled, visitors will see the static page that is loaded from the *ErrorPages* folder located in the root of your website. 

> [!note]
> SXA only generates an *ErrorPages* folder on the instance that you are on when you click Generate static error page. If you are using a scaled environment, you must manually copy the *ErrorPages* folder and paste it onto your Content Delivery servers.