WebmasterID logoWebmasterID
Crawl diagnostics

HTTP 412 Precondition Failed

HTTP 412 Precondition Failed is returned when one or more preconditions in the request headers — such as If-Match or If-Unmodified-Since — evaluate to false against the current resource. It is the negative outcome of conditional requests used to avoid lost updates. It is distinct from 304 Not Modified, which is the cache-validation outcome for conditional GETs that crawlers rely on.

Verified against primary sources

What 412 means

412 Precondition Failed, defined in RFC 9110, is returned when a precondition header in the request is false for the target resource's current state. The classic case is If-Match with an ETag for optimistic concurrency: the client says 'update this only if it still has this version'; if the version changed, the server answers 412 instead of overwriting newer data.

If-Unmodified-Since works the same way with a timestamp. The point is to prevent the lost-update problem when several clients edit the same resource.

412 versus 304 for crawlers

Crawlers commonly send conditional GETs with If-None-Match (an ETag) or If-Modified-Since. When the resource is unchanged, the server returns 304 Not Modified and the crawler reuses its cached copy, saving bandwidth and crawl budget. That is the healthy, expected conditional outcome on the read path.

412 lives on the write path. If you see 412 in logs tied to GET page fetches, something is sending the wrong precondition header; for API writes, 412 is the correct way to reject a stale update.

How it appears in analytics and logs

A 412 means a precondition the client set was not satisfied, so the server refused to perform the request. For crawling specifically, the related signal is usually 304, not 412; a 412 typically points to an API write using If-Match for concurrency control.

Diagnostic use case

Distinguish 412 on conditional writes (optimistic concurrency) from the 304 cache responses crawlers use, so you debug the correct conditional flow.

What WebmasterID can help detect

WebmasterID surfaces status codes including conditional outcomes, helping you separate cache-validation traffic (304) crawlers use from precondition failures (412) on your write endpoints.

Common mistakes

Privacy and accuracy notes

A 412 is a request-level conditional outcome with no personal data. WebmasterID records the status without storing entity tags or visitor identity.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.