Netlify _redirects file to resolve the "Page Not Found" on refresh

Published on: Thursday, 9.05.2024

For a simple Vue.js page deployed with Netlify the problem of getting "Page Not Found" error when a page is refreshed can be fixed by adding a _redirects file. In it we configure the server (in this case, Netlify) to serve the index.html file for all routes. This file needs to be in the public folder and should contain the following line:

/\* /index.html 200