---
title: Redirects
description: Manage Astro's redirects config and create a 404 page. Admins only.
---

**Redirects** edits the `redirects` object in `astro.config.*`. Add, change and delete rules with a status code (301, 302, 303, 307, 308; 301 and 308 pass link equity). Source paths can use `[param]` and `[...rest]` patterns. **Create a 404 page** adds `src/pages/404.astro` if the site has none.

```ts astro.config.mjs
export default defineConfig({
  redirects: {
    "/old-post": "/blog/new-post",
    "/team": { status: 302, destination: "/about" },
  },
});
```

The [Gitupcms SEO](/plugins/seo) Links agent proposes redirects for broken links.

:::warning[Limits]
- A static site does not send a real 301: Astro writes an HTML page with meta refresh and canonical. Use an SSR adapter or a host like Netlify or Vercel for real status codes.
- 410 and 451 need middleware; Astro's `redirects` does not support them.
- If `redirects` is imported from another file, it cannot be edited here.
- Redirects are committed directly, even when reviews are on.
:::
