412 Precondition Failed means that one or more conditions in the request headers evaluated to false. It is the result of a failed If-Match or If-Unmodified-Since, or of a failed If-None-Match on methods other than GET and HEAD. The server did not perform the requested action.
Its main purpose is to prevent lost updates (optimistic concurrency control). A client reads a resource with its ETag, edits it and sends the change with If-Match and that ETag. If someone else changed the resource in the meantime, the ETag no longer matches, and the server answers 412 instead of overwriting the other change. It is also used with If-None-Match: * to create a resource only if it does not exist yet.
For GET and HEAD, a false If-None-Match or If-Modified-Since produces 304 Not Modified, not 412.
Example response
HTTP/1.1 412 Precondition Failed
Date: Fri, 06 Nov 2026 10:15:32 GMT
ETag: "v8"
Content-Type: application/json
Content-Length: 52
{"error":"If-Match does not match the current ETag"} SEO and redirect checking
Common causes and use cases
- An edit was rejected because the resource changed after it was read (ETag mismatch).
If-None-Match: *prevented an existing file from being overwritten.- A cloud storage or CDN API received a conditional request with an outdated ETag.