[Support Guide] I’ve deployed my site but I still see "Page not found”

I am afraid that you will not be able to deploy Nextjs to Netlify without losing functionality.

It should work, meaning that it will not throw errors, with the following netlify.toml

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

If you read Nextjs docs on the next export command you will see that you lose a bunch of very interesting Nextjs features.

I moved my app over to Vercel ( Nextjs own deployment structure ) due to this.

See also this discussion

3 Likes

Have you seen these articles? They talk through best practices for Next.js on Netlify:

They may not solve all of your problems, but I think they will solve some :slight_smile:

2 Likes

Hi Dennis, Hi everyone.
I’m Lowi, newbie here.
I’m stuck with 404 page though the deployment is published.
I’m using an Eleventy theme that runs in localhost.
I checked the /index.html and it seems good.
Please could you help me?
Thanks in advance!

Here’s a pic showing deploy log

1 Like

Hi, @lowi307. What site is this for?

You can private message (PM) that to one of our support staff and I’ve confirmed that PMs are enabled for your community login. Note, that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.

3 Likes

Hi @luke, thanks for replying!
I sent you a PM for better communication, then I’ll post the solution here.

1 Like

I deployed my site with a custom domain I purchased from you guys and I’m getting a 404 error with “Looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.”

2 Likes

TL;DR: switch from BrowserRouter to HashRouter.

I was able to enter my react site with the link and even access the routes with the nav links BUT when i refresh any page exept the homepage the i got this annoying 404 error (I already have my styled 404 page) and when i try to access any page from the url even if it exist i get the same 404 error.

MY SOLUTION:
I switched from using BrowserRouter to use HashRouter from react-router-dom

10 Likes

Hi,
I just started using Github, and I realized that my code was rather properly written and I was able to publish it as well, but for some very odd reason “Page not found” error kept popping up. Even after downloading the Deploy, as instructed, I can see that the downloaded “published” file has the “index.html” in it. Would you be able to assist me with this?

2 Likes

@rmanshani06 Welcome to the Netlify community.

Please provide your Netlify site name, domains, and other information when you post. The better the post = the faster we can help!

Is your index.html at the top level of your website? That’s where it must be. If it is in a sub-folder the default URL won’t find it.

1 Like

Netlify Site Name: Coding Practice
Domain Name: https://practical-varahamihira-e3e406
I hope this helps.
When you say if it’s at the top level of my website, can you elaborate a little on that?

1 Like

Hey @rmanshani06,

Site’s loading for me out in the UK! You may want to clear your browser’s cache :+1:.

1 Like

Hi,
the reason why I contacted you was regarding the fact that if you submit on the Demo Contact Tab, that is when the “error” pops up of the “Page Not Found”. Instead, I think it should be “Thank you for your response”. You can correct me, if I am wrong about this?

1 Like

To be more specific, the Form submission tab is what is not working for me on Github and that is when the error pops up of “Page Not Found”.

1 Like

You’ll want to ensure you add a success page successfully. You should check out the docs!

If you continue to encounter errors, please create a new topic as we’re now looking more specifically at forms.

1 Like

I just began HTML/CSS and I created my repository & Linked it with Netlify yet i get the same issue what do i do?

2 Likes

hi there, did you read the guide on resolving this issue?

2 Likes

yes but i do not understand what i must do can you explain it to me like a baby

2 Likes

Netlify Site Name: https://discordvuejs.netlify.app/
Still having “page not found”

Also did:
checked build command
checked publish directory

1 Like

Hi, @YousefAbood. We would be happy to troubleshoot and explain more about why this is happening. Would you please send us a link to the non-working site?

@flityzz, your site doesn’t have any HTML files in the deploy directory. For example, there is the following javascript file:

https://discordvuejs.netlify.app/build.js

but there isn’t any index.html. Are you building a static version of your site or does your site require a node application server to work?

2 Likes

I am having the same issue of page not found even though I have index.html file in the root folder.
url: https://d4w.netlify.app

2 Likes