Support Forums

Page not found when deploying Nextjs

@BernardA, I’m feeling a bit like we are both saying, “Water is wet.” There isn’t any disagreement that I can see.

You wrote this:

So, unless a clear alternative way is pointed out, the fact remains that Netlify is not able to handle Nextjs full functionality.

I already agreed with that when I said this:

We do not hide this nor do we hide that Netlify doesn’t support server-side rendering by default.

People workaround this using Functions but that isn’t necessarily identical to server-side rendering.

I already agreed that we don’t handle all forms of Next.js apps and we never implied otherwise.

Is there some question or discussion you want to have about this?


I ended up here after a google search for “netlify nextjs deploy page not found” (something like that) and in my case, it was actually pretty straightforward to set it up.

For those searching for a solution, I added netlify.toml to my project root with content;

    command = "npm run build && npm run export"
    publish = "out"

Then add the export script to package.json;

"scripts": {
    "export": "next export"

Build settings for the netlify project;
Build command: npm run build && npm run export
Publish directory: out

Using @cassidoo’s blog post here https://www.netlify.com/blog/2020/05/04/building-a-markdown-blog-with-next-9.4-and-netlify
Thanks for pointing that out @luke

1 Like

@kerem It did fix failed deployment for my nextjs web application on netlify but the page not found issue persisted when i try to visit site domain from my netlify dasboard. I have read a couple of blogs and suggestions in the community but havenot been successful.

Here is a :github repo


You dont seem to have export in your netlify.toml, maybe try changing it as recommended in the post I linked above.

@kerem Unfortunately It is not working out as expected even after editing netlify.toml, You can refer to my repo in my previous response.

This is the :netlify deploy log


Hi, @salimsema. This topic should explain the issue you are seeing in detail:

​Please let us know if you have any questions after reading that topic.

Thanks everyone , however i don’t think the issues has been resolved yet , i am trying to use netlify service for my website https://gemsyogi.com/ but nothing seems to work

hi @rohitahuja - can you tell us more information please? what are the things that don’t seem to work?