428 Precondition Required
- Use it when
- The request has no precondition header and the server requires one
A 428 means the server requires a conditional request, such as an If-Match header, to prevent lost updates. See how to fetch the ETag and resend your PUT or PATCH.
A 428 Precondition Required error means the server only accepts this request if it is conditional, typically because an If-Match header is missing. The client caused it. Fetch the resource, read its ETag, then resend the update with an If-Match header carrying that value. The point is to prevent one client overwriting another's changes.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
The server's API rule triggers it, and the client has to comply. MDN says "typically, a 428 response means that a required precondition header such as If-Match is missing". When a precondition header is present but does not match the server's state, the answer is 412 Precondition Failed instead. RFC 6585 says responses with 428 "MUST NOT be stored by a cache".
A 428 answers a request that lacks a header the server requires, which an app or API client normally sets for you. Reload the document or record and make your change again, so the app fetches the latest version first. If it keeps failing, update the app or report the error to the service.
GET /docs/my-document HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
ETag: "xyzzy"
PUT /docs/my-document HTTP/1.1
Host: example.com
If-Match: "xyzzy"
Content-Type: application/json
{ ... }HTTP/1.1 428 Precondition Required
Content-Type: text/html
<html>
<head>
<title>Precondition Required</title>
</head>
<body>
<h1>Precondition Required</h1>
<p>This request is required to be conditional;
try using "If-Match".</p>
</body>
</html>RFC 6585 says responses with this status "SHOULD explain how to resubmit the request successfully". Look for the header the server names.
Read the ETag from the GET response.
Add If-Match with that ETag to the PUT, PATCH or DELETE. RFC 9110 says If-Match is "most often used with state-changing methods (e.g., POST, PUT, DELETE) to prevent accidental overwrites when multiple user agents might be acting in parallel".
If the ETag no longer matches, the server answers 412. Fetch the new version, merge your change and resend.
Return the required header in the body, as RFC 6585's example does with 'try using "If-Match"'.
4 questions people ask next, answered from the sources on this page.
The server requires the request to be conditional, and the request had no precondition header, such as If-Match.
GET the resource, take its ETag, and resend your update with an If-Match header set to that value.
428 means a required precondition header is missing. 412 means a precondition header was sent and did not match the server's current state.
No. RFC 6585 says responses with the 428 status code MUST NOT be stored by a cache.
Run the free audit, then approve the fixes. Every change can be undone.