I'm trying to solve a problem when refreshing the page and I get a 404. I've been trying to fix it for several days

Hi, I’m Thai and I’m not very good at English. I’m sorry. I read a problem similar to mine and tried to solve it but couldn’t solve it. I’m crying now I’ve been having this problem for several days and I still can’t solve it.
I added netlify.toml but I don’t know if I did it correctly.

My site name: https://vonble.netlify.app/
X-Nf-Request-Id : 01HTW27WP16MER6J3Y0NG7XYCW

I have several of my websites on netlify encountering this problem. If you could explain to me how to solve it, I would really appreciate it. :smiling_face_with_tear:



@vasawat77 This is an easy one.

Your app appears to be an SPA (Single Page Application), so the other “pages” don’t actually exist.

See the note here in the warning box that says Avoid 404s for SPAs:

You need to add the rewrite as demonstrated here:

It ensures requests for routes that don’t exist are served your applications main index.html file

If it’s unclear, here’s a more detailed explanation I gave previously:

1 Like

OMG Thank you very much, it was very easy but I was confused for a while. :laughing: :melting_face: