# Not Found

`not-found.js` is a file convention that lets you define fallback UI for a route segment when the `notFound()` function is thrown or an unmatched URL is visited.

Use filesytem hierarchy to define more or less specific fallback UI.

### Demo

- Navigate to non-existent categories or sub-categories:
  - [Non-existent Category](/not-found/does-not-exist)
  - [Non-existent Sub-category](/not-found/electronics/does-not-exist)

### Links

- [Docs](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)
- [Code](https://github.com/vercel/next-app-router-playground/tree/main/app/not-found)
