Handling 404s and Catch-All Routes
Learn how to define a fallback route that matches any URL not handled by more specific routes, for a proper Not Found page.
A catch-all (wildcard) route matches any URL that doesn't match a more specific route definition earlier in the routing configuration, letting you render a proper 'Page Not Found' UI instead of a blank screen or a router error when a user navigates to (or types) a URL that doesn't correspond to anything in the app. In React Router, this is expressed with a path of * as the last route in a <Routes> list.
A catch-all route is like a general delivery window at a post office for mail that doesn't match any specific PO box number — every more specific box gets checked first, and only mail that doesn't fit any of them ends up handled by the general fallback window.