---
title: "Redirects"
description: "Send old URLs to new ones — renamed pages across versions, and host-level redirects."
---

> Documentation Index
> Fetch the complete documentation index at: https://nimbus-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Redirects

Two mechanisms cover the common cases: renaming a page across versions, and host-level URL redirects. To change only where a sidebar entry links, without a redirect, see [`external_link`](/navigation/sidebar#hide-or-change-one-pages-entry).

## Renamed pages across versions

When a page's slug changes between versions, declare the old slug on the new page so the two are linked as the same logical page and a canonical URL is emitted:

```yaml
---
title: Configuration
previousSlug: config        # was /config in v1, now /reference/configuration
---
```

`previousSlug` accepts a string or an array (for renames across several versions). Nimbus also auto-generates redirects from old-version URLs whose slug no longer exists to their current-version sibling.

## Host-level redirects

For permanent URL moves, use Astro's built-in `redirects` config — Nimbus merges its version redirects with yours, and your hand-written entries win on conflict:

```ts title="astro.config.ts"
export default defineConfig({
  redirects: {
    "/old-path": "/new-path",
  },
});
```

On static hosts these compile to redirect files; on Cloudflare and other adapters they become native redirect rules.

When you move a collection to another folder ([Collection URLs](/writing/collections#collection-urls)), redirect its old URLs with one dynamic entry:

```ts title="astro.config.ts"
export default defineConfig({
  redirects: {
    "/sdk/[...slug]": "/products/sdk/[...slug]",
  },
});
```

Astro writes a redirect page for each old page URL. It doesn't redirect the old Markdown and `llms.txt` URLs, and with a `base` it can't redirect the pages either. For those, add a host rule to `public/_redirects` (Cloudflare or Netlify), with the `base` in both paths:

```text title="public/_redirects"
/docs/sdk/* /docs/products/sdk/:splat 301
```

When you move the collection again, point the existing entry at the new folder too; Astro rejects a redirect to a folder no route serves.

Source: https://nimbus-docs.com/navigation/redirects/index.mdx
