How to redirect to a 404.tsx page in case of Page not found? #4417
Answered
by
bharatkashyap
anavisgueira
asked this question in
Help and support
-
How can I have a personal "Page not found" in case of error 404? I´ve read that I have to create a 404.tsx page in a "\pages" directory, but it doesn´t work. Tks a lot! |
Beta Was this translation helpful? Give feedback.
Answered by
bharatkashyap
Nov 15, 2024
Replies: 1 comment 1 reply
-
I'm assuming you're using the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
anavisgueira
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm assuming you're using the
pages
directory together with theapp
directory. This is a Next.js issue vercel/next.js#58945, but the workaround (mentioned in the issue comments) is to use thenot-found.tsx
file in theapp
directory instead ofpages/404.tsx