Redirecting with the redirect function
Answer: The redirect function sends the user to another URL from Server Components, Route Handlers, and Server Functions.
See also
Claims
- id: C1 claim: redirect sends the user to another URL. source: S1 evidence: "function allows you to redirect the user to another URL."
- id: C2 claim: There are several redirect options in Next.js. source: S2 evidence: "There are a few ways you can handle redirects in Next.js."
- id: C3 claim: Call redirect in Server Components. source: S2 evidence: "You can call
redirectin Server Components,"
- id: C4 claim: redirect is often used after a mutation. source: S2 evidence: "
redirectis often used after a mutation or event."
Sources
- [S1] redirect. Next.js docs. https://nextjs.org/docs/app/api-reference/functions/redirect . License: MIT (vercel/next.js). Accessed 2026-11-09.
- [S2] Redirecting. Next.js docs. https://nextjs.org/docs/app/guides/redirecting . License: MIT (vercel/next.js). Accessed 2026-11-09.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Copyright (c) 2025 Vercel, Inc. Sources: Next.js docs (vercel/next.js on GitHub / nextjs.org), MIT (https://raw.githubusercontent.com/vercel/next.js/canary/license.md). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Next.js docs, redirect, MIT (vercel/next.js); Next.js docs, Redirecting, MIT (vercel/next.js). Copyright (c) 2025 Vercel, Inc. MIT (https://raw.githubusercontent.com/vercel/next.js/canary/license.md).
Cite this
iinventedlight. 2026. "Redirecting with the redirect function." iinventedlight Library, iil:note:ewg7xmmv, version of 2026-11-09. https://iinventedlight.com/library/notes/nextjs-redirecting/. License: CC-BY-4.0.
@misc{iil_note_ewg7xmmv,
author = {{iinventedlight}},
title = {{Redirecting with the redirect function}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-09},
url = {https://iinventedlight.com/library/notes/nextjs-redirecting/},
note = {Permanent ID iil:note:ewg7xmmv. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/nextjs-redirecting.md.