---
schema_version: "1"
id: 42d99c536b5f876a5043354233918e5b07ef2ac5be4268cae1d321a7af450b12
title: Trigger Redirects In PWA Kit
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/pwa-kit-managed-runtime/guides/pwa-redirects.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-redirects.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e6cb1255cd2b3f77c60d34b9f61e31d3234387e5a76ef69fa3745663dc2d50f6
products:
  - Composable Storefront
  - Salesforce APIs
---
# Trigger Redirects In PWA Kit

:::Note
To redirect whole pages or assets, use the Redirect functionality provided by Runtime Admin or the Managed Runtime API. See [Redirects](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/managed-runtime-administration.html#redirects).
:::

The Progressive Web App (PWA) Kit uses [React Router](https://v5.reactrouter.com/web/guides/quick-start) redirects.
However, the React Router [Redirect](https://v5.reactrouter.com/web/api/Redirect) component does not let you set a status code.

In PWA Kit 3.9, we added a `RedirectWithStatus` component that builds on top of the React Router Redirect component and allows you to create redirects with a status code.

### Example

The example below shows how you would add a redirect with an HTTP 301 status from an example page to the login page in your PWA Kit project. 

```
import React from 'react'
import RedirectWithStatus from '@salesforce/pwa-kit-react-sdk/ssr/universal/components/redirect-with-status'

const ExamplePage = () => {
    return (
        <RedirectWithStatus status={301} to='/login' />
    )
}
```