2023-07-05 15:11:16 +02:00
---
title: Redirect During getStaticProps Prerendering
---
2020-09-08 09:23:21 +02:00
2023-07-05 15:11:16 +02:00
## Why This Error Occurred
2020-09-08 09:23:21 +02:00
The `redirect` value was returned from `getStaticProps` during prerendering which is invalid.
2023-07-05 15:11:16 +02:00
## Possible Ways to Fix It
2020-09-08 09:23:21 +02:00
Remove any paths that result in a redirect from being prerendered in `getStaticPaths` and enable `fallback: true` to handle redirecting for these pages.
2023-07-05 15:11:16 +02:00
## Useful Links
2020-09-08 09:23:21 +02:00
2023-07-05 15:11:16 +02:00
- [Data Fetching Documentation](/docs/pages/building-your-application/data-fetching/get-static-props)