Edit this page
Learn how to handle server 404s and missing routes.
404s can be handled by using a +not-found.tsx route. This route matches all unmatched routes from a nested level. This is similar to [...wild].tsx. However, unlike the deep dynamic routes, +not-found.tsx is matched after API routes.
On web, the server will first serve files in the following order:
On native, where there is no server, the router will first try to perform a client-navigation, then fall back on +not-found
routes if no route matches.
In the future, +not-found
routes will integrate with data fetching and suspense to allow for custom 404 pages during online-only native operations.