---
title: "Discussion on \"Next.js soft 404: why notFound() returned 200 behind loading.tsx\" | Hashnode"
description: "Discussion on \"Next.js soft 404: why notFound() returned 200 behind loading.tsx\". Unknown slugs on my Next.js App Router site returned HTTP 200 with index and noindex tags. loading.tsx was the cause, dynamicParams = false the fix."
url: "https://hashnode.com/posts/nextjs-soft-404-loading-tsx/6af3ae65b6a13c936150a729"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Next.js soft 404: why notFound() returned 200 behind loading.tsx](https://mohamedgado.hashnode.dev/nextjs-soft-404-loading-tsx?utm_source=hashnode&utm_medium=feed)

Unknown slugs on my Next.js App Router site returned HTTP 200 with index and noindex tags. loading.tsx was the cause, dynamicParams = false the fix.

7h ago · 6 min read · mohamedgado.hashnode.dev  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#seo](https://hashnode.com/tag/seo)
-   [#nextjs-app-router](https://hashnode.com/tag/nextjs-app-router)
-   [#webdev](https://hashnode.com/tag/webdev)

## Written by

[Mohamed Gado](https://hashnode.com/@mohamedgado)

@mohamedgado · Tanta, Egypt

  
[View profile](https://hashnode.com/@mohamedgado)

Senior Software Engineer · React, Next.js, React Native · Building Masareef & Rafiq

Senior Software Engineer with 6+ years building web and mobile products in React, Next.js and React Native. I build and ship Masareef and Rafiq on my own. Originals live at mohamedgado.com/writing.

## Responses 1

Markdown supported · ⌘↵ to post

[OneLifeVibe](https://hashnode.com/@onelifevibe)

[6h ago](https://hashnode.com/posts/nextjs-soft-404-loading-tsx/6af3ae65b6a13c936150a729/comment/6af3bc370ced3775a9d5f8a4)

The duplicate robots tags are the detail that would have worried me most — a page carrying both 'index, follow' from the root layout and 'noindex' from the streamed not-found, with a 200 status, leaves the outcome entirely up to whichever tag a crawler happens to honour. The dynamicParams = false fix is elegant precisely because it moves the decision to routing, before loading.tsx can stream anything. For the database-driven case you flag as the wrong fit, would the proxy.ts check you used for the encoded-slash slugs be your preferred route there too, or would you rather call notFound() before any await on the slow path so the status is set before streaming starts?
