Next.js Works Locally but Shows 404 After Vercel Deployment – Why?

My Next.js app runs fine on my own computer (local development), but when I deploy it to Vercel, some pages or the whole site shows a 404 error (page not found). Why does this happen?

There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0.

Hi @suheb,

Welcome to the Vercel community!

I appreciate your question, and I understand your concerns. Before I provide a solution, I would like to learn more details about the issue, especially since it relates to deployment.

I recommend checking out the guides on Deploying to Vercel.

Could you also please share which tech stack you are using?

I look forward to your detailed reply.

Thanks,
Chintan

1 Like