How to create a 404 page in a NextJS project

Oscar de la Hera Gomez
A flower that represents NextJS with the text "404" beneath it.

Add a not-found.tsx file to the app folder. It works the same way as any page within the app router.

A screenshot of VSCode showing the not found page within the student archive.

To create a 404 page within an app router, create a not-found.tsx file.

It will work the same as any page within the app router.

If you are not familiar with the NextJS app router, consult the link below.

Looking to learn more about NextJS, ReactJS or web development?

Search our blog to find educational content on NextJS, ReactJS and web development.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details