---
title: "`notFound()`/`redirect()` inside a component rendered under `<Suspense>` (lint/not-found-in-suspense)"
description: "lint/not-found-in-suspense: Once streaming starts the HTTP status is already sent."
canonical: https://void-design.vercel.app/rules/lint/not-found-in-suspense
lastModified: 2026-09-16
---

# `notFound()`/`redirect()` inside a component rendered under `<Suspense>`

`lint/not-found-in-suspense` · severity **warn** · category Lint · detected by `void lint` and `void audit`

## Why it matters

Once streaming starts the HTTP status is already sent. `notFound()` thrown inside a Suspense boundary returns 200 with a noindex meta (a soft 404), and `redirect()` becomes a client-side redirect crawlers may not follow.

## How to fix it

Resolve existence at the top of `page.tsx` (or in `generateMetadata`) before rendering any `<Suspense>`, then pass the data down.

## Example

```tsx
export default async function Page({ params }) {
  const post = await getPost((await params).slug)
  if (!post) notFound()          // before any Suspense
  return <Suspense fallback={<Skeleton />}><Comments id={post.id} /></Suspense>
}
```

## References

- https://nextjs.org/docs/app/api-reference/functions/not-found
- https://nextjs.org/docs/app/api-reference/file-conventions/loading#status-codes

## More lint rules

`void lint` reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.

- `missing-metadata` Page has no `metadata` / `generateMetadata` and inherits only the root title — [lint/missing-metadata](https://void-design.vercel.app/rules/lint/missing-metadata)
- `missing-metadata-base` Root layout metadata has no `metadataBase` — [lint/missing-metadata-base](https://void-design.vercel.app/rules/lint/missing-metadata-base)
- `canonical-in-root-layout` Canonical URL set in the root layout — [lint/canonical-in-root-layout](https://void-design.vercel.app/rules/lint/canonical-in-root-layout)
- `og-merge-drops-parent` Page `openGraph` replaces the layout's (shallow merge drops images/siteName) — [lint/og-merge-drops-parent](https://void-design.vercel.app/rules/lint/og-merge-drops-parent)
- `missing-sitemap` No sitemap — [lint/missing-sitemap](https://void-design.vercel.app/rules/lint/missing-sitemap)
- `missing-robots` No robots.txt — [lint/missing-robots](https://void-design.vercel.app/rules/lint/missing-robots)
- `missing-og-image` No Open Graph image anywhere — [lint/missing-og-image](https://void-design.vercel.app/rules/lint/missing-og-image)
- `missing-icon` No favicon / app icon — [lint/missing-icon](https://void-design.vercel.app/rules/lint/missing-icon)

Detected by `void lint` and `void audit`. Explain it in a terminal: `void rules lint/not-found-in-suspense`
