Browser, server and HTTP
A browser asks a server for a resource using an HTTP request. A response contains a status, headers and often a body. The browser interprets HTML and other resources to display a page. In a Next.js project, a URL can select a route whose UI is prepared before the request or during the request, depending on configuration.
Read a simplified HTTP exchange
GET /catalog HTTP/1.1Host: books.example
HTTP/1.1 200 OKContent-Type: text/html
<h1>Catalog</h1>This illustrative exchange omits transport and framing details. The request names /catalog; the response indicates success and supplies HTML. The browser displays Catalog as a heading.
URL versus file
A user visits /catalog, not /app/catalog/page.tsx. The framework maps the public path to an implementation file. A missing item may produce a 404 response, while an unexpected server failure may produce a 500 response. The actual status depends on the route and when the response begins streaming. For example, the documented Next.js not-found convention can render missing-item UI with status 200 for a streamed response or 404 for a non-streamed response. A HEAD request has no response body; use GET to compare the visible content and status.
Common mistake
Do not assume a page that displays an error message has a particular HTTP status. Inspect the response separately.
Try it yourself
Write an expected path, status and visible heading for a public help page.
Example status: static walkthrough; Next.js build and browser behavior have not been executed in this authoring environment.