Describe the Issue
Refreshing a route results in a 404 Not Found error when deployed on Vercel, even though navigating via the application works correctly.
Media Evidence
Possible Cause
This is a common issue with client-side routing frameworks when the hosting provider (Vercel) is not configured to fallback all non-file requests to the frontend entry point.
On refresh, Vercel attempts to request the route directly from the server, and since the file doesn’t physically exist, it returns 404.
Suggested Fix
Configure Vercel to rewrite all unmatched routes to the frontend app
This ensures all paths are served by the frontend router instead of returning 404.
Environment
- OS: Arch Linux
- Node.js version: v24.7.0
- npm version: 11.6.0
- Browser: Chrome
Additional Context
Describe the Issue
Refreshing a route results in a 404 Not Found error when deployed on Vercel, even though navigating via the application works correctly.
Media Evidence
Possible Cause
This is a common issue with client-side routing frameworks when the hosting provider (Vercel) is not configured to fallback all non-file requests to the frontend entry point.
On refresh, Vercel attempts to request the route directly from the server, and since the file doesn’t physically exist, it returns 404.
Suggested Fix
Configure Vercel to rewrite all unmatched routes to the frontend app
This ensures all paths are served by the frontend router instead of returning 404.
Environment
Additional Context