Next.js · Senior · Question 69 of 75
notFound() is called inside a component that streams in a <Suspense> boundary. What does the crawler get?
- ✓Correct answer: HTTP status 200 (already sent) plus a
<meta name="robots" content="noindex">tag in the streamed HTML - 2A 404 status, because Next.js rewrites the headers
- 3A 500 error
Explanation
Starting the stream fixes the status code. For a real 404 status, call notFound() before anything streams, e.g. at the top of the page.