Custom 404 page not picked up? #11544
Unanswered
wereHamster
asked this question in
Help
Replies: 2 comments
-
Works perfectly in the codesandbox example that you're giving 🤔 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Weird. If you start with the next.js hello world template on CSB, add a 404 page, you can reproduce the behaviour I've observed. Perhaps it works in my example because I restarted the CSB container… |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://codesandbox.io/s/nextjs-933-custom-404-page-x6r6f
When you go to /404, then 404.js page is rendered. When you go to /doesnotexist, then the standard Next.js 404 page is rendered.
I'm not sure what else I'm supposed to do. The documentation (https://nextjs.org/docs/advanced-features/custom-error-page#404-page) says to create
pages/404.js
which is what I did.Beta Was this translation helpful? Give feedback.
All reactions