Refresh get Not Found Page

Site name zaraenlaparaibana.netlify.app or zaraenlaparaibana.org
Site ID 2c923ea1-1c68-4c9e-8d71-1b9a658945fd

The site works well, each page and link are working well. The issue is when I refresh the page then I got Page Not Found.

notfound

The issue doesn’t occur on local development server but only on the production server. I mean, when I refresh http://localhost:3000/the-beginning it works perfectly, however when I refresh zaraenlaparaibana.org/the-beginning I got Page Not Found. Note that the pages work well, I access zaraenlaparaibana.org/the-beginning and it opens normally, the problem only occurs when I refresh.

Also, the issue doesn’t occur on Home, I mean, when I refresh zaraenlaparaibana.org it is ok, but when I refresh zaraenlaparaibana.org/anything I got Page Not Found.

Someone could help me?

Hi @VonSouza , thanks for the post and welcome.
If you have not read the information in the post below, kindly do so as it is similar to yours.

Thanks.

Thanks @clarnx .
I’ve read it. I do believe the issue is Incorrect publish directory.

I’m using a Vite project, so the configuration for the public directory (publish directory) is typically managed through your web server configuration, and Vite itself doesn’t have an option to specify the output directory.

I’d like to ensure that the web server is configured to serve the files from the appropriate location on the server. The text suggest:

  1. ‘either move all your files outside the sub-folder’ or
  2. ‘change the publish directory in Netlify Site settings.’

I dind’t find in Netlify Site settings option to change the publish directory.
Move all my files outside seems a little complicated.

Where can I change publish directory in Netlify Site settings?

Hi there! You can change your publish directory by navigating to the site then going to Site Configuration > Build and Deploy > Build Settings

1 Like

[quote="[Support Guide] I’ve deployed my site but I still see “Page not found”, post:1, topic:125”]
change the publish directory in Netlify Site settings
[/quote]

Thanks @sid.mann !
Exactly as you said, besides we can find it at:

https://app.netlify.com/sites/{YOUR_SITE}/settings/deploys#continuous-deployment

But it was correct, I had a dist there for my Publish directory.


I found what was missing.
I didn’t have _redirects file which should exist in the public folder, I created it and insert /* /index.html 200 (As step 2 taught) .

Thanks everyone :laughing:

1 Like

Hi @VonSouza , glad to know your problem is now fixed.