# 404 on nextjs deployment

**URL:** <https://answers.netlify.com/t/404-on-nextjs-deployment/76733>\
**Category:** Support\
**Tags:** deployment\
**Created:** [October 3, 2022, 1:54pm UTC](https://answers.netlify.com/t/404-on-nextjs-deployment/76733 "2022-10-03T13:54:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerem9610](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kerem9610/32/41778_2.png) [@kerem9610](https://answers.netlify.com/u/kerem9610)\
**Post date:** [October 3, 2022, 1:54pm UTC](https://answers.netlify.com/t/404-on-nextjs-deployment/76733/1 "2022-10-03T13:54:08Z")

</div>

Hello,

I am currently trying to publish a nextJS site to netlify, but it shows a 404, link here:  
[https://animedream.netlify.app/](https://animedream.netlify.app/)

It is a mono-repo with a root, that contains frontend and backend folder:

- root →   
\*\* backend →   
\*\*\*\* backend\_stuff  
\*\* frontend →   
\*\*\*\* package.json  
\*\*\*\* /pages  
\*\*\*\*…

So in the netlify UI I changed the base directory to “frontend”. And Publish Directory to “frontend/.next”

It is installing the dependencies and the “tree” during build that comes up when building next apps can also be seen in the logs.

I already tried to use the two variations of build command mentioned in the documentation for monorepos. It is not helping.

When i download the directory I can see that there is no index.html.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Melvin](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/melvin/32/23606_2.png) [@Melvin](https://answers.netlify.com/u/Melvin)\
**Post date:** [October 3, 2022, 3:13pm UTC](https://answers.netlify.com/t/404-on-nextjs-deployment/76733/2 "2022-10-03T15:13:54Z")

</div>

Hi @kerem9610,

Thanks for reaching out and welcome to the Netlify Support Forums!

We have a general Support Guide on Page Not Found errors here that may help:

> [@\[Support Guide\] I’ve deployed my site but I still see "Page not found”](https://answers.netlify.com/t/support-guide-i-ve-deployed-my-site-but-i-still-see-page-not-found/125):
>
> Last reviewed by Netlify Support - August, 2023 Netlify attempts to lookup a file based on several xor filters, and when all of these fail, we end up serving a 404 page. For example, a request made to /example/ would check /example/index.html, /example.html, /example/home.html and several other combinations (not necessarily in the same order) before hitting the 404. However, in case you were not expecting a 404 at a particular URL, you might be interested in finding out the reason and potentia…

I also found this recent post with a similar [issue](https://answers.netlify.com/t/404-page-not-found-nextjs/76110/2), if you could try clarnx’s suggesting if the first Support Guide doesn’t help.

If you have any questions, please let us know.

---

<div class="post-metadata">

**Author:** ![kerem9610](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kerem9610/32/41778_2.png) [@kerem9610](https://answers.netlify.com/u/kerem9610)\
**Post date:** [October 3, 2022, 3:41pm UTC](https://answers.netlify.com/t/404-on-nextjs-deployment/76733/3 "2022-10-03T15:41:55Z")

</div>

Thank you for the response and the links.

I am afraid non of these helped, I looked at them beforehand and checked again now, but I still would not know what I did wrong.

I have a different site deployed on netlify (also with nextjs) and whenenver I download that, there is a index.html file created in the zip. On this repo no index file is created, but I can not find out why. I think that this is the problem

Best Regards

---

<div class="post-metadata">

**Author:** ![hillary](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hillary/32/21132_2.png) [@hillary](https://answers.netlify.com/u/hillary)\
**Post date:** [October 4, 2022, 5:57pm UTC](https://answers.netlify.com/t/404-on-nextjs-deployment/76733/4 "2022-10-04T17:57:19Z")

</div>

Hey there, @kerem9610 👋

If those suggestions did not work, can you please share your repository as well as your most recent deploy log? We will need those details in order to investigate further.

Thanks!

---

<div class="post-metadata">

**Author:** ![veedahv](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/veedahv/32/56865_2.png) [@veedahv](https://answers.netlify.com/u/veedahv)\
**Post date:** [November 29, 2023, 10:16am UTC](https://answers.netlify.com/t/404-on-nextjs-deployment/76733/5 "2023-11-29T10:16:57Z")

</div>

Hello. Please I am having the same issues with my project. I deployed my project and have tried several suggestions but it is still showing 404 page not found

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [December 1, 2023, 8:10am UTC](https://answers.netlify.com/t/404-on-nextjs-deployment/76733/6 "2023-12-01T08:10:13Z")

</div>

Hi @veedahv , welcome,  
Kindly read @Melvin’s reply in this post above or click on the link at [404 on nextjs deployment - #2 by Melvin](https://answers.netlify.com/t/404-on-nextjs-deployment/76733/2)

If the above does not work kindly share a snippet of your build logs for me to debug the reason for the 404 not found.
