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

SXA lets you set site-specific 404 and 500 error pages. When an error occurs, visitors are redirected to this static error page.

> [!note]
> -   For a page not found (404) error page, you must create the page under your Sitecore instance.
>
> -   For a server error (500) page, you must create the page on the website of the rendering host. The Server error page link field in the Content Editor is inactive.

To generate a static 404 error page:

1. Create your error page.
2. Publish the error page.
3. Navigate to *sitecore/Content/Tenant/Site/Settings* .
4. In the **Error Handling** section, in the **Page not found link** field, insert a link to the custom error page.

    ![Insert a link to the error page](https://doc.sitecore.com/api/markdown-image/xp/en/developers/sxa/103/sitecore-experience-accelerator/images/headless-site-error-handling.png)

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