---
title: "How to create a custom 404 page in NextJS"
url: https://daily.dev/posts/how-to-create-a-custom-404-page-in-nextjs-eqagv4jgd
source_url: https://eke.hashnode.dev/how-to-create-a-custom-404-page-in-nextjs
type: article
source: "Hashnode"
author: "Victor Eke"
published: 2022-07-20T10:44:45.934Z
updated: 2022-07-20T10:44:45.845Z
tags: ["nextjs"]
reading_time: 3
upvotes: 15
comments: 6
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to create a custom 404 page in NextJS

**[Hashnode](https://daily.dev/sources/hashnode)** · [@eke](https://daily.dev/eke) · 3 min read · 15 upvotes · 6 comments

## Summary

Next.js provides a static 404 page by default. In a NextJS app, when you visit a URL that is not available in your project, you will be redirected to a 404 page. This page comes default without any setup whatsoever. In this article, I'll walk you through the process on how to create a custom 404 page in NextJS.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://eke.hashnode.dev/how-to-create-a-custom-404-page-in-nextjs>

## Community discussion

Top comments from developers on daily.dev.

**@khansa837** · 1 upvotes

> Thanks for sharing this article. Realy helpful :)

**@krishna100** · 1 upvotes

> thanks a lot

**@irreverentmike** · 1 upvotes

> Nice succint tutorial @Eke, I dig it! As a follow-up, it might be interesting to explore what makes a good 404 page.  I built one for my site, and though it doesn't come up often, I have occationally gotten folks contacting me from 404 pages. I've also got some automations in place to notify me of how people get to 404s... super useful for SEO!  My 404 page is here if you're intrigued... -> https://mikebifulco.com/404

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#nextjs](https://daily.dev/tags/nextjs)

[View this post on daily.dev](https://daily.dev/posts/how-to-create-a-custom-404-page-in-nextjs-eqagv4jgd)
