What it means
204 is common in APIs, for example after a successful delete, saving settings or logging an event, when the client doesn't need a response. The body must be empty. When a browser navigates to a 204, it stays on the current page.
Most common causes
- An API successfully handled a PUT, PATCH or DELETE.
- An analytics or beacon call that needs no response.
- A CORS preflight (OPTIONS) request that some servers answer with 204.
- A misconfigured server returning 204 for an HTML page.
What you can do as a visitor
- If you click a link and nothing happens, the target may have returned 204. Try again later or let the site owner know.
What the site owner or developer should do
- Never return 204 for HTML pages; use 200 or the appropriate error.
- In an API, only use 204 when the client genuinely needs no body; otherwise return 200 with the result.
- Make sure a 204 has no body and no Content-Length greater than 0.
Impact on SEO and Google
Google doesn't index 204 pages because there is no content. For public pages a 204 is always a mistake.
Frequently asked questions
Is 204 an error?
No. It is a successful response with no content, mainly intended for APIs.
Why is my page blank in the browser with a 204?
Because a 204 by definition has no content. The server should return 200 for the page.