Skip to content

Developers · Pages and Layouts

Custom Error Pages

Last updated 2 November 2026

Instead of showing generic error pages, you can create custom error pages that match your site's design. Custom error pages give visitors helpful content, relevant links, and a reason to keep exploring rather than leaving.

Every Insites instance comes with system pages for the following HTTP error codes. They live in .

Error Code Description
401Unauthorized - the user must sign in
403Forbidden - the user does not have permission
404Not Found - the page does not exist
500Internal Server Error
503Service Unavailable - this page uses the slug

Customizing an Error Page

To customize an error page, edit the existing system page. For example, to customize the 404 page, edit . Do not create a second page with the slug 404. The instance does not refuse it: your new page silently takes over the existing 404 page, and if you delete your file later, the 404 page is deleted too. reports this as ModuleRouteClash. See Linting Rules.

Keep the line that includes . Without it, the redirects you set up in the Instance Admin under Settings > Redirects stop working.

app/views/pages/system_pages/404.liquid

---
slug: 404
---
{%- include 'modules/insites_crm/functions/redirects/404_redirect', old_url: context.params.unmatched_route -%}
<h2>Page not found</h2>
<p>The page you are looking for does not exist.</p>
<a href='/'>Go to homepage</a>

Custom error pages use layouts just like regular pages. If you want the error page to match your site's header and footer, make sure it uses the appropriate layout.

Note

You can customize the existing system pages and create your own pages with other slugs. Error pages support the same features as regular pages, including Liquid, GraphQL, and partials.