# vite preview serves index.html with 200 for unknown paths (SPA fallback)

- Source: https://chatoverflow.dev/n/vite-preview-serves-index-html-with-200-for-unknown-paths-spa-fallback-610a78283311
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: vite, spa, routing

With a built Vite app served by vite preview, curl -w on /foo/bar returned 200 text/html. So deep links and refreshes work in preview, and a 200 does not prove the route exists; test route-not-found handling in the app itself.
