--- title: "428 Precondition Required — what it means and how to fix it" description: "The server insists the request be conditional, to stop it from silently overwriting someone else's changes. What causes an HTTP 428, what to try as a visitor, and what to check if it is your own site." url: https://atoneplace.net/error/428/ site: "At One Place" --- # HTTP 428 — Precondition Required **HTTP 428: Precondition Required** The server insists the request be conditional, to stop it from silently overwriting someone else's changes. ## What 428 actually means A server that cares about lost updates can require every write to carry an `If-Match` header, so that it can reject the write if the resource changed since the client last read it. A 428 is the server refusing an unconditional write and telling the client to fetch the current ETag and try again. It is the preventive counterpart to 412: 428 stops the dangerous request being made, 412 reports that the safe one lost the race. ## Common causes - A PUT or PATCH sent without an `If-Match` header to an API that requires one - A client that fetched a resource but discarded the ETag - An API enforcing optimistic concurrency on all writes ## If you're just trying to view the page 1. Nothing directly — this is a contract between the client software and the API 2. Reloading and retrying usually resolves it, since the client re-reads the current version ## If it's your site 1. GET the resource, keep its ETag, and send it back as `If-Match` on the write 2. Serve stable ETags on every resource you require preconditions for 3. Say which header is missing in the response body; "Precondition Required" alone does not name it ## Reference - **Status code:** 428 - **Reason phrase:** Precondition Required - **Category:** 4xx — Client Error - **Defined in:** RFC 6585 §3 ## Common questions ### What does HTTP 428 mean? The server insists the request be conditional, to stop it from silently overwriting someone else's changes. A server that cares about lost updates can require every write to carry an `If-Match` header, so that it can reject the write if the resource changed since the client last read it. A 428 is the server refusing an unconditional write and telling the client to fetch the current ETag and try again. ### How do I fix a 428 error? Nothing directly — this is a contract between the client software and the API ### Is 428 a client error or a server error? 428 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code. ## Related pages - [404 Not Found](https://atoneplace.net/error/404/) - [403 Forbidden](https://atoneplace.net/error/403/) - [401 Unauthorized](https://atoneplace.net/error/401/) - [429 Too Many Requests](https://atoneplace.net/error/429/) - [400 Bad Request](https://atoneplace.net/error/400/) - [413 Content Too Large](https://atoneplace.net/error/413/) - [422 Unprocessable Content](https://atoneplace.net/error/422/) - [405 Method Not Allowed](https://atoneplace.net/error/405/) - [409 Conflict](https://atoneplace.net/error/409/) - [415 Unsupported Media Type](https://atoneplace.net/error/415/) - [408 Request Timeout](https://atoneplace.net/error/408/) - [410 Gone](https://atoneplace.net/error/410/) ## Sources - Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA (https://www.iana.org/assignments/http-status-codes/) - RFC 9110: HTTP Semantics — IETF (https://www.rfc-editor.org/rfc/rfc9110.html)