Routing: Intercepting Routes | Next.js
Intercepting routes allows you to load a route from another part of your application within the current layout. This routing paradigm can be useful when you want to display the content of a route without the user switching to a different context. For example, when clicking on a photo in a feed, you can display the photo in a modal, overlaying the feed. In this case, Next.js intercepts the /photo/123 route, masks the URL, and overlays it over /feed. However, when navigating to the photo by clicking a shareable URL or by refreshing the page, the entire photo page should render instead of the modal. No route interception should occur. Intercepting routes can be defined with the (..) convention, which is similar to relative path convention ../ but for segments. You can use: For example, you can intercept the photo segment from within the feed segment by creating a (..)photo directory. Note that the (..) convention is based on route segments, not the file-system. Intercepting Routes can be
This page is also available as Markdown at /docs/app/api-reference/file-conventions/intercepting-routes.md . For an index of Next.js documentation , see /docs/llms.txt . Copy page Intercepting Routes Last updated June 16, 2025 Intercepting routes allows you to load a route from another part of your application within the current layout. This routing paradigm can be useful when you want to display the content of a route without the user switching to a different context. For example, when clicking on a photo in a feed, you can display the photo in a modal, overlaying the feed. In this case, Next
Explore this link on the map →related reading
- File-system conventions: Parallel Routes | Next.jsnextjs.org
- Getting Started: Layouts and Pages | Next.jsnextjs.org
- Cursor Docs — Agent, Rules, MCP, Skills & CLIdocs.cursor.com
- projects, claire wangclairebookworm.com
- Next.Js 13 Parallel Routes: A Comprehensive Guide | HackerNoonhackernoon.com
- Building a single-page application with Next.js and React Routercolinhacks.com
- File-system conventions: loading.js | Next.jsnextjs.org
- App Router: Navigating Between Pages | Next.jsnextjs.org
- Getting Started: Error Handling | Next.jsnextjs.org
- Getting Started: Layouts and Pages | Next.jsnextjs.org
- Town | The AI Assistant That Does the Worktown.com
- LessWronglesswrong.com