# DOCS_REDIRECTS_BROKEN

<!-- Generated by docs/modules/diagnostics from the package catalogs. Write a guide in docs/diagnostics/<CODE>.md instead of editing this file. -->

A redirect route rule breaks a link. With the link checker on, a production build stops. The message lists each rule with its fix:

```txt [output/docs-redirect-error.txt]
Docs redirects break links:
- The redirect from /docs/old goes to /docs/nowhere, which is not a docs page. Point it to a page, or remove the route rule.
- The redirect from /docs/guide/install hides the page docs/guide/install.md. Remove the route rule, or move the page.
```

## Why it happens

The link checker accepts a link to a redirect rule, so the redirect must lead to a page. One of these:

- The redirect goes into a section, the docs base, or `/raw/`, where no docs page answers.
- The redirect starts at a docs page, so nobody can open that page.
- Redirects loop back to where they started.

A chain of redirects counts where it ends.

## Fix it

Point the rule's `redirect` to a page, or remove the rule. The module checks only exact rules, and a chain may end at another site. Wildcard rules such as `/docs/old/**` and direct redirects to another site get only the link checker's own checks. The module does not validate destinations outside the docs.

## Source

`DOCS_REDIRECTS_BROKEN` belongs to the `docs` package. Its catalog entry is in [`src/error-diagnostics.ts`](https://github.com/vite-hub/vitehub/blob/main/packages/docs/src/error-diagnostics.ts#L40). It is raised in [`src/redirects.ts`](https://github.com/vite-hub/vitehub/blob/main/packages/docs/src/redirects.ts#L77).

See [all Docs site diagnostics](https://vitehub.dev/docs/docs-site/diagnostics).

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/docs-site.md)
- [Get started](https://vitehub.dev/raw/docs/docs-site/get-started.md)
- [Add to a Nuxt app](https://vitehub.dev/raw/docs/docs-site/nuxt-app.md)
- [Configure](https://vitehub.dev/raw/docs/docs-site/configure.md)
- [Docs assistant](https://vitehub.dev/raw/docs/docs-site/assistant.md)
- [Server API](https://vitehub.dev/raw/docs/docs-site/server-api.md)
- [Limits and errors](https://vitehub.dev/raw/docs/docs-site/limits-and-errors.md)

Next: [DOCS_SEO_FAILED](https://vitehub.dev/raw/docs/docs-site/diagnostics/docs_seo_failed.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
