What does HTTP 204 mean?
The request succeeded and there is no response body. Common for DELETE, for PUT/PATCH that do not return the updated resource, and for CORS preflight responses. A 204 response must not contain a body.
2xx Success: The request was received, understood and accepted.
204 and SEO
A page that returns 204 has no content and will not be indexed.
Example response
HTTP/1.1 204 No Content
How to return a 204 response
Node.js (Express)
res.status(204).json({ error: 'No Content' });PHP
http_response_code(204);Python (Flask)
return {'error': 'No Content'}, 204Go (net/http)
w.WriteHeader(204)nginx
return 204;
Related status codes
- 200 OK — The request succeeded and the response body contains the requested resource.
- 304 Not Modified — The cached copy is still valid, so the server sends no body.
Check which status code a URL returns with the HTTP header checker.