Skip to content

404 not found after refresh #21

@MohakGupta2004

Description

@MohakGupta2004

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

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions