# HX-Redirect

The `HX-Redirect` response header redirects to a new URL with a full page reload.

Use this when redirecting to non-htmx endpoints, or to pages with different `<head>` content or scripts that require a full browser load. For AJAX navigation that stays within your htmx application, use [`HX-Location`](https://four.htmx.org/reference/headers/HX-Location) instead.

Response headers are not processed on 3xx response codes. Return a 2xx status when using this header.

## Example

```http
HX-Redirect: /dashboard
```

```python
return Response(
    "Redirecting...",
    headers={'HX-Redirect': '/dashboard'}
)
```

See also: [`HX-Location`](https://four.htmx.org/reference/headers/HX-Location)