Vercel does not display not-found page on Next.js project #7171
Replies: 3 comments 8 replies
-
The structure of the urls in the example is: |
Beta Was this translation helpful? Give feedback.
-
Hi @dkottas-nelios! Let me try and help you out here 😄 My understanding is that your Next.js project using However, when I went on both these deployments, they each return "not found". Netlify: netlify-url Am I missing something? Below is a screenshot from your Vercel link: |
Beta Was this translation helpful? Give feedback.
-
This discussion was automatically locked because the community moved to a new site. Please join us at vercel.community |
Beta Was this translation helpful? Give feedback.
-
Summary
I have a Next.js project that uses generateStaticParams with dynamicParams = false. Urls that don't use the provided params and should return thwe not found page, do so on localhost and Netlify but not on Vercel.
for example:
https://next-notfound-test.netlify.app/page-x/page-d
https://nextjs-notfound.vercel.app/page-x/page-d
Both pages are deployed from the same commit.
Example
https://nextjs-notfound.vercel.app/this-does-not-exist/page-d
Steps to Reproduce
Use this repo https://gitlab.com/dkottas/nextjs-notfound and deploy it on Vercel with one env variable NEXT_PUBLIC_DOMAIN="http://localhost:3000"
pointing to the address where you deploy.
You should note what is described above.
Beta Was this translation helpful? Give feedback.
All reactions