Page Not Found (Broken url)

I hosted my portfolio website on Netlify, I don’t know why but whenever I run it on my code editor it’s working correctly but when I’m running it using Netlfiy URL then I get the error “broken URL” (attached below), suppose I’m going to the about page and then if I refresh the page I’m getting this error

"Page Not Found
It looks like you’ve followed a broken link or entered a URL that doesn’t exist on this site.

Back to our site

If this is your site, and you weren’t expecting a 404 for this path, please visit Netlify’s “page not found” support guide for troubleshooting tips."

but if I do the same in my code editor, it’s working properly what is the issue?? and please help me as soon as possible

@anirban-629 The can be answered pretty quickly with more information.

Are you able to provide:

  • The link to the site
  • Your Basic build settings
  • Access to the repository, or at the very least a screenshot of the folder structure for what you’re deploying

npm run build

@anirban-629 Your site is an SPA (Single Page Application), so the only page that actually exists is index.html

You need to add a _redirects file with /* /index.html 200 as shown in the documentation:

Netlify needs it to be in your Publish directory, so in your case you would put it in your public folder.