---
title: "412 Precondition Failed"
canonical: "https://lemwatch.com/http-status-codes/412"
category: "client-error"
last_verified: "2026-12-01"
source: "https://lemwatch.com"
---

# HTTP 412 Precondition Failed

**TL;DR** — 412 means "the thing you are changing is no longer the version you think it is". Fetch it again to get the current version, then repeat the request with the new value.

## What it means

HTTP 412 Precondition Failed is returned when a request includes a conditional header and the condition does not hold. The most common use is safe updating: the client sends If-Match with the version it last saw, and the server only applies the change if that is still the current version. If someone else changed the resource first, the server answers 412 instead of overwriting their work.

## Common causes

- An If-Match header carrying an ETag that no longer matches the resource
- An If-Unmodified-Since date earlier than the resource's last change
- If-None-Match: * on a create request when the resource already exists
- A proxy or CDN changing or stripping ETags so they never match

## How to fix

- Fetch the resource again and read its current ETag
- Reapply your change to the fresh copy and resend with the new ETag in If-Match
- If ETags never match, check whether a proxy or compression layer is rewriting them, for example turning strong ETags into weak ones
- If you do not need the safeguard, remove the conditional header, accepting that the last write wins

## SEO impact

Search engines do not send the conditional headers that produce 412, so it rarely affects crawling. If a public page does return it, it is treated like any other 4xx and the page will not be indexed.

## Monitoring tip

A burst of 412 responses on an API after a CDN or proxy change usually means ETags are being altered in transit. Compare the ETag at the origin with the one clients receive.

**Related:** [409](https://lemwatch.com/http-status-codes/409.md), [304](https://lemwatch.com/http-status-codes/304.md), [400](https://lemwatch.com/http-status-codes/400.md)

_Canonical HTML page: https://lemwatch.com/http-status-codes/412_
