---
title: redirectDocument
---

# redirectDocument

[MODES: framework, data]

## Summary

[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.redirectDocument.html)

A redirect response that will force a document reload to the new location.
Sets the status code and the `Location` header.
Defaults to "302 Found".

## Signature

```tsx
redirectDocument(url, init): Response
```

## Params

### url

[modes: framework, data]

_No documentation_

### init

[modes: framework, data]

_No documentation_
