HTTPfy

200 OK

The request succeeded and the response body contains the result.

200 at a glance

Code
200
Name
OK
Class
2xx Successful
Status
IANA-registered standard code
Defined in
RFC 9110, Section 15.3.1
Cacheable by default
Yes, heuristically cacheable (RFC 9110 section 15.1): without Cache-Control or Expires, caches may store it and pick a freshness lifetime themselves. Send explicit Cache-Control to stay in control.

What 200 means

200 OK is the default success status. What the body means depends on the method: for GET it is the resource, for POST the result of the action, for HEAD the same headers without a body. 200 is heuristically cacheable, so without Cache-Control a browser or CDN may reuse the response for a while based on Last-Modified.

What typically causes a 200

  • Any successful page load, API call or asset request.
  • A "soft 404": an error or empty page returned with 200, which search engines and monitoring both treat as success.

Fix it on the server

  • Return a real error status (404, 410, 500) for error pages; a 200 error page is a soft 404 and hides problems from monitors.
  • Set Cache-Control explicitly. Without it, CDNs and browsers may cache a 200 heuristically.
  • For a successful POST that creates something, 201 with Location is more precise; for no body, 204.

Fix it as a client or visitor

  • A 200 does not mean the application succeeded: check the body for error fields when an API wraps errors in 200.
  • If you get a stale 200, look at Age and Cache-Control headers to find which cache served it.

Headers that go with 200

HeaderRole
Content-TypeMedia type of the body.
Cache-ControlHow long and where the response may be cached.
ETagVersion validator used for later 304 responses.

Example response

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1256
Cache-Control: max-age=300
ETag: "5f2a-1a"

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.