> ## Documentation Index
> Fetch the complete documentation index at: https://context7-enes-docs7-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Redirects

> Redirect moved pages in docs.json or with a _redirects file

## In docs.json

```json theme={null}
{
  "redirects": [
    { "source": "/old-page", "destination": "/new-page" },
    { "source": "/guides/:slug*", "destination": "/tutorials/:slug*" },
    { "source": "/temp", "destination": "/current", "permanent": false }
  ]
}
```

* Redirects are permanent by default (HTTP 308); `permanent: false` uses 307.
* `:name*` wildcards match a path suffix and carry it to the destination.

## With a `_redirects` file

Alternatively, ship a `_redirects` file in your docs folder using the standard one-rule-per-line syntax:

```
# comments and blank lines are fine
/old-page   /new-page        308
/guides/*   /tutorials/:splat
/gone       /                301
```

* Allowed statuses: 301, 302, 303, 307, 308 (anything else is treated as 301; omitted means 301).
* Exact rules always win over `/*` splat rules; among splats, the first match wins.
* A request with a trailing slash falls back to the rule without it.
* The query string is preserved unless the destination has its own.

<Warning>
  Use either `docs.json` redirects or a `_redirects` file, not both. When `docs.json` declares any redirects, the generated rules replace a hand-written `_redirects` file.
</Warning>

## No rule cap

Redirects are evaluated in the site's edge worker rather than as a static hosting table, so there is no practical limit on the number of rules. Sites with tens of thousands of redirects work fine.

## Home-page fallback

If no page maps to `/`, Docs7 automatically redirects the root to the first page in your navigation.
