Skip to content
4xx · Client Error

412 Precondition Failed

A condition the client set on the request was not met, so the server did not proceed.

What it means

HTTP 412 Precondition Failed means the request carried a conditional header — such as If-Match or If-Unmodified-Since — and the condition turned out to be false. The client said, in effect, do this only if the resource is still in a certain state, and because it was not, the server declined to act.

When it happens

It happens with conditional requests guarding against lost updates: a client tries to write only if the resource has not changed since it last read it, and the resource has in fact changed, so the precondition fails.

How to fix it

  • Re-read the resource to get its current ETag or last-modified value, then retry with an updated precondition.
  • Confirm the conditional header is using the right validator for the resource's current state.
  • Remove the conditional header if the request does not actually need to be guarded.

SEO impact

None directly. Conditional writes are an API concern and do not affect how pages are crawled or indexed.

Check it with Sitewell

Find out which of your URLs return 412

Paste a list of URLs and Sitewell checks the status code of every one at once — free and without signup.

Related codes

Related guides