Should I add a not-found.jsx file for each page?

Hello,

I have a not-found.jsx file under the App folder, and on some pages I redirect to the notFound() function for some situations and I see the design. However, no link works. It does not redirect.

But if I add not-found.jsx in this page folder, …


This content originally appeared on DEV Community and was authored by Gündoğdu Yakıcı

Hello,

I have a not-found.jsx file under the App folder, and on some pages I redirect to the notFound() function for some situations and I see the design. However, no link works. It does not redirect.

But if I add not-found.jsx in this page folder, it works fine. Do I have to add not-found.jsx to each page individually?

My Next.js version is 13.2.3.


This content originally appeared on DEV Community and was authored by Gündoğdu Yakıcı


Print Share Comment Cite Upload Translate Updates
APA

Gündoğdu Yakıcı | Sciencx (2023-03-31T12:46:13+00:00) Should I add a not-found.jsx file for each page?. Retrieved from https://www.scien.cx/2023/03/31/should-i-add-a-not-found-jsx-file-for-each-page/

MLA
" » Should I add a not-found.jsx file for each page?." Gündoğdu Yakıcı | Sciencx - Friday March 31, 2023, https://www.scien.cx/2023/03/31/should-i-add-a-not-found-jsx-file-for-each-page/
HARVARD
Gündoğdu Yakıcı | Sciencx Friday March 31, 2023 » Should I add a not-found.jsx file for each page?., viewed ,<https://www.scien.cx/2023/03/31/should-i-add-a-not-found-jsx-file-for-each-page/>
VANCOUVER
Gündoğdu Yakıcı | Sciencx - » Should I add a not-found.jsx file for each page?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/03/31/should-i-add-a-not-found-jsx-file-for-each-page/
CHICAGO
" » Should I add a not-found.jsx file for each page?." Gündoğdu Yakıcı | Sciencx - Accessed . https://www.scien.cx/2023/03/31/should-i-add-a-not-found-jsx-file-for-each-page/
IEEE
" » Should I add a not-found.jsx file for each page?." Gündoğdu Yakıcı | Sciencx [Online]. Available: https://www.scien.cx/2023/03/31/should-i-add-a-not-found-jsx-file-for-each-page/. [Accessed: ]
rf:citation
» Should I add a not-found.jsx file for each page? | Gündoğdu Yakıcı | Sciencx | https://www.scien.cx/2023/03/31/should-i-add-a-not-found-jsx-file-for-each-page/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.