# React Router 7: Private Routes (alias Protected Routes)

DevFeed: [React Router 7: Private Routes (alias Protected Routes)](<https://devfeed.tech/articles/react-router-7-private-routes-alias-protected-routes-18971.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/react-router-private-routes/>)

Author: Robin Wieruch

Published: 2025-01-06T05:52:47Z

Content type: tutorial

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [React Router](<https://devfeed.tech/topics/react-router.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [React](<https://devfeed.tech/topics/react.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [react](<https://devfeed.tech/tags/react.md>), [react-router](<https://devfeed.tech/tags/react-router.md>), [react-router-7](<https://devfeed.tech/tags/react-router-7.md>), [react-router-private-routes](<https://devfeed.tech/tags/react-router-private-routes.md>), [react-router-protected-routes](<https://devfeed.tech/tags/react-router-protected-routes.md>), [route](<https://devfeed.tech/tags/route.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

A tutorial on implementing private or protected routes in React Router 7. It demonstrates guarding pages with authentication, permissions, and roles, including redirecting unauthorized users and handling login and logout state.

## Source excerpt

How to use Private Routes in React Router 7 (alias Protected Routes) by using conditions (e.g. authentication, permissions, roles) to authorize users for guarded pages ...