---
title: "Custom Platform Error Pages (Next.js app router)"
description: "Customize the platform error page with Next.js App Router"
url: "https://vercel.com/templates/next.js/custom-platform-error-pages-next-js-app-router"
links:
  repository: "https://github.com/vercel/examples/tree/main/cdn/custom-error-pages-app-dir"
  demo: "https://custom-error-pages-app-dir.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=Custom+Platform+Error+Pages+%28Next.js+app+router%29&demo-description=Customize+the+platform+error+page+with+Next.js+App+Router&demo-url=https%3A%2F%2Fcustom-error-pages-app-dir.vercel.app%2F&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F3AMpYlJwKFIPCpIZB5mVpr%2F3a6a02fc88d94de1365ba27a53371c91%2FScreenshot_2026-01-23_at_4.15.23%C3%A2__PM.png&project-name=Custom+Platform+Error+Pages+%28Next.js+app+router%29&repository-name=custom-platform-error-pages-next-js-app-router&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fcdn%2Fcustom-error-pages-app-dir&from=templates&skippable-integrations=1&root-directories=List+of+directory+paths+for+the+directories+to+clone+into+projects&project-names=Comma+separated+list+of+project+names%2Cto+match+the+root-directories"
---

# Custom Platform Error Pages (Next.js app router)

Customize the platform error page with Next.js App Router

|
| 500 | `/500` (from `app/500/page.tsx`) |
| 502 | `/500` (fallback) |
| 503 | `/500` (fallback) |
| 504 | `/504` (from `app/504/page.tsx`) |
| 508 | `/500` (fallback) |

## Learn more

- [Custom Error Pages Documentation](https://vercel.com/docs/cdn/custom-error-pages)

## Related Templates

### [Custom Platform Error Pages (Next.js Public dir)](https://vercel.com/templates/next.js/custom-platform-error-pages-next-js-public-dir)

Customize the platform error page with the public/ directory.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
