PrivTab

Misimbo ya hali ya HTTP

Tafuta msimbo wa hali ya HTTP

Inafanya kazi ndani ya kivinjari chako · Hakuna kupakia

Zana hii na maelekezo kwenye ukurasa huu bado ni kwa Kiingereza kwa sasa. Inafanya kazi vilevile: kila kitu kinafanya kazi ndani ya kivinjari chako.

All status codes

100 Continue

The server got the request headers and the client may send the body.

What to do: Seen with "Expect: 100-continue" before large uploads; clients handle it on their own. RFC 9110

101 Switching Protocols

The server agrees to switch protocol, for example to WebSocket.

What to do: Normal when a WebSocket connection opens. RFC 9110

102 Processing

A WebDAV server has the request and is still working on it.

What to do: Deprecated; rarely used today. RFC 2518

103 Early Hints

Headers sent before the final response so the browser can start loading files (preload).

What to do: Harmless; the real response follows. RFC 8297

200 OK

The request worked.

What to do: Nothing to fix. RFC 9110

201 Created

A new resource was made; its address is usually in the Location header.

What to do: Typical answer to a successful POST. RFC 9110

202 Accepted

The request was accepted but is processed later.

What to do: Check the job's status later; the result is not ready yet. RFC 9110

203 Non-Authoritative Information

The answer was changed by a proxy on the way.

What to do: Usually caused by a transforming proxy. RFC 9110

204 No Content

It worked and there is nothing to send back.

What to do: Typical answer to DELETE or a save. Don't expect a body. RFC 9110

205 Reset Content

It worked; the client should clear the form it sent.

What to do: Rarely used. RFC 9110

206 Partial Content

Only the requested part (Range) is sent.

What to do: Normal for video streaming and resumed downloads. RFC 9110

207 Multi-Status

WebDAV: several results in one XML body.

What to do: Read each result inside the body. RFC 4918

208 Already Reported

WebDAV: members already listed earlier in the response.

What to do: Avoids listing the same item twice. RFC 5842

226 IM Used

The answer is a delta (changes only) of the resource.

What to do: Very rarely used. RFC 3229

300 Multiple Choices

There are several versions to choose from.

What to do: Rarely used; pick one of the offered links. RFC 9110

301 Moved Permanently

The resource has a new permanent address (Location header).

What to do: Update links and bookmarks. Search engines pass the ranking to the new URL. Browsers may change POST to GET; use 308 to prevent that. RFC 9110

302 Found

Temporary redirect to the Location header.

What to do: Keep using the original URL. For a permanent move use 301 or 308. RFC 9110

303 See Other

Go to another URL with GET, typically after a form was sent.

What to do: The "post, redirect, get" pattern that prevents sending a form twice. RFC 9110

304 Not Modified

The cached copy is still current, so no body is sent.

What to do: Normal and good: the browser uses its cache. RFC 9110

305 Use Proxy

Deprecated: asked the client to use a proxy.

What to do: Ignored by browsers for security reasons. RFC 9110

307 Temporary Redirect

Temporary redirect that keeps the method and body (POST stays POST).

What to do: Keep using the original URL. RFC 9110

308 Permanent Redirect

Permanent redirect that keeps the method and body.

What to do: Like 301 but POST stays POST. Update your links. RFC 9110

400 Bad Request

The server can't understand the request (wrong syntax, invalid JSON, bad parameters, oversized cookie).

What to do: Check the body and parameters against the API documentation. For websites, clearing the site's cookies often helps. RFC 9110

401 Unauthorized

You are not logged in, or the login (token, password) is missing or invalid.

What to do: Log in again or send a valid Authorization header. Despite the name, it means "not authenticated". RFC 9110

402 Payment Required

Reserved; some services use it when a payment or plan is needed.

What to do: Check the account's billing or plan limits. RFC 9110

403 Forbidden

The server knows who you are but you may not access this.

What to do: Check permissions, file ownership, IP blocks and firewall rules. Logging in again won't help. RFC 9110

404 Not Found

Nothing exists at this address.

What to do: Check the URL for typos. For a moved page, redirect the old address with 301. RFC 9110

405 Method Not Allowed

The URL exists but not for this method (for example POST where only GET works).

What to do: The Allow header lists the methods that work. RFC 9110

406 Not Acceptable

The server can't give a format the Accept headers ask for.

What to do: Loosen the Accept header (for example Accept: */*). RFC 9110

407 Proxy Authentication Required

A proxy between you and the server needs a login.

What to do: Configure the proxy credentials. RFC 9110

408 Request Timeout

The client took too long to send the request.

What to do: Try again; check a slow or interrupted connection. RFC 9110

409 Conflict

The request clashes with the current state (an edit conflict, a duplicate).

What to do: Reload the latest version and try again. RFC 9110

410 Gone

It existed but was removed for good.

What to do: Remove links to it. Search engines drop it faster than a 404. RFC 9110

411 Length Required

The server needs a Content-Length header.

What to do: Send the body's length. RFC 9110

412 Precondition Failed

A condition such as If-Match was false (someone changed it first).

What to do: Fetch the current version (new ETag) and retry. RFC 9110

413 Content Too Large

The request body is bigger than the server accepts.

What to do: Send less, or raise the limit (client_max_body_size in nginx, upload_max_filesize and post_max_size in PHP). RFC 9110

414 URI Too Long

The URL is longer than the server accepts.

What to do: Move long data from the query string into a POST body. RFC 9110

415 Unsupported Media Type

The body's format (Content-Type) isn't supported.

What to do: Set the right Content-Type, for example application/json. RFC 9110

416 Range Not Satisfiable

The requested byte range is outside the file.

What to do: Request a range within the file size. RFC 9110

417 Expectation Failed

The server can't meet the Expect header.

What to do: Remove "Expect: 100-continue". RFC 9110

418 I'm a teapot

An April Fools' joke from 1998, kept reserved so nobody reuses it.

What to do: Some services return it on purpose to refuse automated requests. RFC 9110 (reserved)

419 Page Expired Unofficial · Laravel

Laravel: the form's security token (CSRF) expired.

What to do: Reload the page and send the form again.

421 Misdirected Request

The request reached a server that can't answer for this host.

What to do: Often a TLS certificate or HTTP/2 connection reuse issue on shared hosting. RFC 9110

422 Unprocessable Content

The format is right but the content is not valid (validation errors).

What to do: Fix the fields listed in the response body. RFC 9110

423 Locked

WebDAV: the resource is locked.

What to do: Wait for the lock to end or remove it. RFC 4918

424 Failed Dependency

WebDAV: failed because an earlier request failed.

What to do: Fix the first failing request. RFC 4918

425 Too Early

The server won't process a request sent in TLS early data, which could be replayed.

What to do: The client should retry after the handshake. RFC 8470

426 Upgrade Required

Use a different protocol (for example a newer TLS or HTTP version).

What to do: See the Upgrade header. RFC 9110

428 Precondition Required

The server needs a conditional request (If-Match) to prevent lost updates.

What to do: Send the ETag you have in If-Match. RFC 6585

429 Too Many Requests

Rate limit: too many requests in a short time.

What to do: Slow down. The Retry-After header says how long to wait. RFC 6585

431 Request Header Fields Too Large

The headers are too big, often because of large cookies.

What to do: Clear the site's cookies or send smaller headers. RFC 6585

440 Login Time-out Unofficial · Microsoft IIS

Microsoft IIS: the session expired.

What to do: Log in again.

444 No Response Unofficial · nginx

nginx closed the connection without answering (used to drop unwanted requests).

What to do: You were blocked by the server's rules.

451 Unavailable For Legal Reasons

Blocked for legal reasons, for example a court order (the number refers to the novel Fahrenheit 451).

What to do: Nothing to fix on the client side. RFC 7725

494 Request Header Too Large Unofficial · nginx

nginx: the request headers are too large.

What to do: Clear cookies or send smaller headers.

495 SSL Certificate Error Unofficial · nginx

nginx: the client certificate is invalid.

What to do: Check the client certificate.

496 SSL Certificate Required Unofficial · nginx

nginx: a client certificate is required.

What to do: Send a client certificate.

497 HTTP Request Sent to HTTPS Port Unofficial · nginx

nginx: plain HTTP was sent to the HTTPS port.

What to do: Use https:// in the URL.

499 Client Closed Request Unofficial · nginx

nginx: the client gave up before the answer came.

What to do: The server was too slow, or the visitor left. Look for slow requests.

500 Internal Server Error

Something went wrong on the server, with no more specific code.

What to do: Check the server error log (PHP errors, crashes, a broken .htaccess). Not the visitor's fault. RFC 9110

501 Not Implemented

The server doesn't support this method at all.

What to do: Use a supported method. RFC 9110

502 Bad Gateway

A proxy or load balancer got an invalid answer from the server behind it.

What to do: The application server (PHP-FPM, Node, the upstream) crashed or isn't running. Check its logs and restart it. RFC 9110

503 Service Unavailable

The server is overloaded or down for maintenance.

What to do: Try again later; Retry-After may say when. Planned maintenance should use this code. RFC 9110

504 Gateway Timeout

A proxy waited too long for the server behind it.

What to do: The app is too slow or stuck: check slow queries and raise the proxy timeout only if needed. RFC 9110

505 HTTP Version Not Supported

The server doesn't support this HTTP version.

What to do: Use HTTP/1.1 or newer. RFC 9110

506 Variant Also Negotiates

A server configuration error in content negotiation.

What to do: Fix the server's negotiation settings. RFC 2295

507 Insufficient Storage

WebDAV: no space left to store the result.

What to do: Free disk space or raise the quota. RFC 4918

508 Loop Detected

WebDAV: an infinite loop was found.

What to do: Fix the circular reference. RFC 5842

509 Bandwidth Limit Exceeded Unofficial · cPanel

Apache/cPanel hosting: the account used up its bandwidth.

What to do: Wait for the next period or raise the hosting limit.

510 Not Extended

Further extensions to the request are required (obsolete).

What to do: Historic; rarely seen. RFC 2774

511 Network Authentication Required

You must log in to the network first, as on hotel or airport Wi-Fi.

What to do: Open any web page to reach the Wi-Fi login page. RFC 6585

520 Web Server Returned an Unknown Error Unofficial · Cloudflare

Cloudflare: the origin server sent an empty or unexpected answer.

What to do: Check the origin server's logs; it may be crashing.

521 Web Server Is Down Unofficial · Cloudflare

Cloudflare: the origin server refused the connection.

What to do: Start the web server, and make sure its firewall allows Cloudflare's addresses.

522 Connection Timed Out Unofficial · Cloudflare

Cloudflare: the origin server didn't answer the connection in time.

What to do: The server is overloaded, offline, or blocking Cloudflare.

523 Origin Is Unreachable Unofficial · Cloudflare

Cloudflare: the origin server can't be reached (DNS or routing).

What to do: Check the DNS records point to the right server.

524 A Timeout Occurred Unofficial · Cloudflare

Cloudflare: the origin connected but took over 100 seconds to answer.

What to do: Speed up the request, or run long jobs in the background.

525 SSL Handshake Failed Unofficial · Cloudflare

Cloudflare: the secure connection to the origin failed.

What to do: Check the origin's SSL certificate and settings.

526 Invalid SSL Certificate Unofficial · Cloudflare

Cloudflare: the origin's certificate is invalid (in Full (strict) mode).

What to do: Install a valid certificate on the origin server.

  • Hakuna kinachoondoka kwenye kifaa chako
  • Hakuna kikomo cha ukubwa kutoka kwa seva
  • Hakuna kujisajili, hakuna alama maji
  • Bure

How to look up a status code

  1. Type the code (like 502) or a word (like "timeout").
  2. Or show only one group, such as 4xx client errors.
  3. Read the meaning and what to do.

The five groups

CodesMeaning
1xxInformation: the request is in progress.
2xxSuccess: it worked.
3xxRedirection: the content is somewhere else.
4xxClient error: something is wrong with the request (address, login, permissions).
5xxServer error: the server failed to answer a valid request.

Unofficial codes

Some codes you will meet are not in the standard: nginx uses 444 and 499, and Cloudflare 520 to 526 for problems reaching your server. They are listed and marked as unofficial.

Maswali yanayoulizwa mara kwa mara

What is the difference between 401 and 403?

401 means you are not logged in (or the login is invalid). 403 means the server knows who you are, but you are not allowed to see this.

What is the difference between 502, 503 and 504?

502: a proxy got a bad answer from the server behind it. 503: the server is overloaded or in maintenance. 504: a proxy waited too long for the server behind it.

Should I use 301 or 302?

301 (or 308) for a permanent move, so search engines move the ranking to the new address. 302 (or 307) only for temporary moves.