1xx Informational

100 CODE

100 Continue

The server has received the request headers and the client should proceed to send the request body.
Fix / Meaning: Everything is good so far. Keep sending the rest of your data.
101 CODE

101 Switching Protocols

The requester has asked the server to switch protocols and the server has agreed to do so.
Fix / Meaning: Switching from HTTP to a newer protocol (like WebSocket).
102 CODE

102 Processing (WebDAV)

The server has received and is processing the request, but no response is available yet.
Fix / Meaning: The server is working on a heavy task. Don't timeout yet.
103 CODE

103 Early Hints

Used to return some response headers before final HTTP message.
Fix / Meaning: Preloading resources (CSS/JS) while the server thinks about the main content.

2xx Success

200 CODE

200 OK

Standard response for successful HTTP requests.
Fix / Meaning: Success! The page loaded or the form was submitted correctly.
201 CODE

201 Created

The request has been fulfilled, resulting in the creation of a new resource.
Fix / Meaning: Success. Your new account, post, or file was created.
202 CODE

202 Accepted

The request has been accepted for processing, but the processing has not been completed.
Fix / Meaning: Request received, but it will be finished in the background (Async).
203 CODE

203 Non-Authoritative Information

The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin.
Fix / Meaning: Success, but the info came from a third party (like a proxy).
204 CODE

204 No Content

The server successfully processed the request and is not returning any content.
Fix / Meaning: Success, but there is nothing to show (often used for Save buttons).
205 CODE

205 Reset Content

The server successfully processed the request, but is not returning any content.
Fix / Meaning: Success. Now please clear your form inputs.
206 CODE

206 Partial Content

The server is delivering only part of the resource (byte serving).
Fix / Meaning: Used when streaming video or resuming a paused download.
207 CODE

207 Multi-Status (WebDAV)

The message body that follows is by default an XML message and can contain a number of separate response codes.
Fix / Meaning: Multiple operations happened at once (some might have failed).
208 CODE

208 Already Reported (WebDAV)

The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response.
Fix / Meaning: We already told you about this file in this request.
226 CODE

226 IM Used

The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations.
Fix / Meaning: Delta encoding: only sending what changed.

3xx Redirection

300 CODE

300 Multiple Choices

Indicates multiple options for the resource from which the client may choose.
Fix / Meaning: There are multiple file formats, languages, or options available.
301 CODE

301 Moved Permanently

This and all future requests should be directed to the given URI.
Fix / Meaning: The page has moved forever. Search engines will update their index to the new URL.
302 CODE

302 Found (Temporary Redirect)

Tells the client to look at (browse to) another URL.
Fix / Meaning: The page is moved for now, but use the old URL again tomorrow.
303 CODE

303 See Other

The response to the request can be found under another URI using the GET method.
Fix / Meaning: Go look at this other page instead (often sent after a POST).
304 CODE

304 Not Modified

Indicates that the resource has not been modified since the version specified by the request headers.
Fix / Meaning: Your cached version is still good. No new data needed.
305 CODE

305 Use Proxy

The requested resource is available only through a proxy, the address for which is provided in the response.
Fix / Meaning: You must use the specified proxy to access this.
306 CODE

306 Switch Proxy

No longer used. Originally meant "Subsequent requests should use the specified proxy."
Fix / Meaning: Deprecated. Do not use.
307 CODE

307 Temporary Redirect

The request should be repeated with another URI; however, future requests should still use the original URI.
Fix / Meaning: Like a 302, but ensures the browser doesn't change the HTTP method (POST stays POST).
308 CODE

308 Permanent Redirect

The request and all future requests should be repeated using another URI.
Fix / Meaning: Like a 301, but ensures the browser doesn't change the HTTP method.

4xx Client Errors

400 CODE

400 Bad Request

The server cannot or will not process the request due to an apparent client error.
Fix / Meaning: You sent invalid data or a malformed request syntax.
401 CODE

401 Unauthorized

Similar to 403 Forbidden, but specifically for use when authentication is required.
Fix / Meaning: You need to log in to see this.
402 CODE

402 Payment Required

Reserved for future use. The original intention was that this code might be used as part of some form of digital cash scheme.
Fix / Meaning: Rarely used standard, but sometimes used by paywalls.
403 CODE

403 Forbidden

The request was valid, but the server is refusing action.
Fix / Meaning: You are logged in, but you do not have permission (e.g., an Admin page).
404 CODE

404 Not Found

The requested resource could not be found but may be available in the future.
Fix / Meaning: The page does not exist. You clicked a broken link or typed it wrong.
405 CODE

405 Method Not Allowed

A request method is not supported for the requested resource.
Fix / Meaning: You tried to POST to a URL that only accepts GET.
406 CODE

406 Not Acceptable

The requested resource is capable of generating only content not acceptable according to the Accept headers.
Fix / Meaning: The server cannot provide the data format (JSON/XML) you asked for.
407 CODE

407 Proxy Authentication Required

The client must first authenticate itself with the proxy.
Fix / Meaning: Log in to your proxy server first.
408 CODE

408 Request Timeout

The server timed out waiting for the request.
Fix / Meaning: You took too long to upload or send the request.
409 CODE

409 Conflict

Indicates that the request could not be processed because of conflict in the current state of the resource.
Fix / Meaning: Edit conflict. Someone else modified this file while you were editing it.
410 CODE

410 Gone

Indicates that the resource requested is no longer available and will not be available again.
Fix / Meaning: The page is deleted permanently and is never coming back.
411 CODE

411 Length Required

The request did not specify the length of its content, which is required by the requested resource.
Fix / Meaning: You need to send a Content-Length header.
412 CODE

412 Precondition Failed

The server does not meet one of the preconditions that the requester put on the request.
Fix / Meaning: Browser checks (like ETag) failed.
413 CODE

413 Payload Too Large

The request is larger than the server is willing or able to process.
Fix / Meaning: The file you are uploading is too big.
414 CODE

414 URI Too Long

The URI provided was too long for the server to process.
Fix / Meaning: Your URL is ridiculously long.
415 CODE

415 Unsupported Media Type

The request entity has a media type which the server or resource does not support.
Fix / Meaning: You uploaded a .png but the server only wants .jpg.
416 CODE

416 Range Not Satisfiable

The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
Fix / Meaning: You tried to download a part of the file that doesn't exist.
417 CODE

417 Expectation Failed

The server cannot meet the requirements of the Expect request-header field.
Fix / Meaning: An expectation in the header could not be met.
418 CODE

418 I'm a teapot

This code was defined in 1998 as one of the traditional IETF April Fools' jokes.
Fix / Meaning: A joke code. The server is a teapot, not a coffee machine.
419 CODE

419 Page Expired (Laravel)

Used by the Laravel Framework when a CSRF Token is missing or expired.
Fix / Meaning: Your session expired. Refresh the page and try again.
420 CODE

420 Enhance Your Calm (Twitter)

Returned by Twitter Search and Trends API when the client is being rate limited.
Fix / Meaning: You are being rate-limited. Chill out.
421 CODE

421 Misdirected Request

The request was directed at a server that is not able to produce a response.
Fix / Meaning: You connected to the wrong server for this domain.
422 CODE

422 Unprocessable Entity (WebDAV)

The request was well-formed but was unable to be followed due to semantic errors.
Fix / Meaning: Valid code, but logically incorrect data (e.g. password too short).
423 CODE

423 Locked (WebDAV)

The resource that is being accessed is locked.
Fix / Meaning: The file is currently locked by another user or process.
424 CODE

424 Failed Dependency (WebDAV)

The request failed because it depended on another request and that request failed.
Fix / Meaning: A previous action failed, so this one cannot happen.
425 CODE

425 Too Early

Indicates that the server is unwilling to risk processing a request that might be replayed.
Fix / Meaning: Security measure against replay attacks.
426 CODE

426 Upgrade Required

The client should switch to a different protocol such as TLS/1.0.
Fix / Meaning: You need to upgrade to HTTPS or a newer protocol.
428 CODE

428 Precondition Required

The origin server requires the request to be conditional.
Fix / Meaning: You must specify an If-Match header to prevent conflicts.
429 CODE

429 Too Many Requests

The user has sent too many requests in a given amount of time ("rate limiting").
Fix / Meaning: Slow down! You are clicking or API polling too fast.
431 CODE

431 Request Header Fields Too Large

The server is unwilling to process the request because its header fields are too large.
Fix / Meaning: Your cookies or URL parameters are way too big.
440 CODE

440 Login Time-out (IIS)

The client's session has expired and they must log in again.
Fix / Meaning: Your session expired on a Microsoft IIS server. Refresh and log back in.
444 CODE

444 No Response (Nginx)

Used internally to instruct the server to return no information to the client and close the connection immediately.
Fix / Meaning: Nginx dropped the connection without sending a response, often to deter malware or block bad requests.
449 CODE

449 Retry With (IIS)

The server cannot honour the request because the user has not provided the required information.
Fix / Meaning: You missed a required parameter in your request to the Microsoft IIS server.
451 CODE

451 Unavailable For Legal Reasons

A server operator has received a legal demand to deny access to a resource.
Fix / Meaning: Censored by the government or removed due to a lawsuit.
460 CODE

460 Client Closed Connection (AWS ELB)

The client closed the connection with the load balancer before the idle timeout period elapsed.
Fix / Meaning: The user closed their browser or the network dropped before AWS could finish sending data.
463 CODE

463 X-Forwarded-For Too Large (AWS ELB)

The load balancer received an X-Forwarded-For request header with more than 30 IP addresses.
Fix / Meaning: There are too many IP addresses in the forwarding header. This usually points to a misconfigured proxy chain.
499 CODE

499 Client Closed Request (Nginx)

Used by Nginx when the client closes the connection while Nginx is still processing the request.
Fix / Meaning: The browser disconnected before the server could reply.

5xx Server Errors

500 CODE

500 Internal Server Error

A generic error message, given when an unexpected condition was encountered.
Fix / Meaning: The server code crashed. Check the error logs.
501 CODE

501 Not Implemented

The server either does not recognize the request method, or it lacks the ability to fulfil the request.
Fix / Meaning: The server does not know how to handle this functionality.
502 CODE

502 Bad Gateway

The server was acting as a gateway or proxy and received an invalid response from the upstream server.
Fix / Meaning: One server (like Nginx) got a bad response from another (like PHP-FPM).
503 CODE

503 Service Unavailable

The server is currently unavailable (because it is overloaded or down for maintenance).
Fix / Meaning: The server is overloaded or down for maintenance. Try again later.
504 CODE

504 Gateway Timeout

The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
Fix / Meaning: The database or backend took too long to reply.
505 CODE

505 HTTP Version Not Supported

The server does not support the HTTP protocol version used in the request.
Fix / Meaning: Your browser is using an old or unsupported HTTP version.
506 CODE

506 Variant Also Negotiates

Transparent content negotiation for the request results in a circular reference.
Fix / Meaning: Server configuration error causing an infinite loop.
507 CODE

507 Insufficient Storage (WebDAV)

The server is unable to store the representation needed to complete the request.
Fix / Meaning: The server is out of disk space.
508 CODE

508 Loop Detected (WebDAV)

The server detected an infinite loop while processing the request.
Fix / Meaning: An operation pointed back to itself infinitely.
510 CODE

510 Not Extended

Further extensions to the request are required for the server to fulfil it.
Fix / Meaning: The server needs more info to process this request.
511 CODE

511 Network Authentication Required

The client needs to authenticate to gain network access.
Fix / Meaning: You need to log in to the Wi-Fi hotspot first.
520 CODE

520 Web Server Returned an Unknown Error (Cloudflare)

The origin server returned an empty, unknown, or unexplained response to Cloudflare.
Fix / Meaning: Something vague went wrong on the main server.
521 CODE

521 Web Server Is Down (Cloudflare)

The origin web server refused the connection from Cloudflare.
Fix / Meaning: The main server is completely offline or blocking Cloudflare.
522 CODE

522 Connection Timed Out (Cloudflare)

Cloudflare could not establish a TCP connection to the origin server.
Fix / Meaning: Cloudflare can't reach your server at all.
523 CODE

523 Origin Is Unreachable (Cloudflare)

Cloudflare could not reach the origin web server. This typically happens when a DNS record is incorrect.
Fix / Meaning: DNS or Routing issue finding the server.
524 CODE

524 A Timeout Occurred (Cloudflare)

Cloudflare was able to make a TCP connection to the origin, but the origin did not reply with an HTTP response.
Fix / Meaning: The server connected but took too long to generate the page.
525 CODE

525 SSL Handshake Failed (Cloudflare)

Cloudflare could not negotiate a SSL/TLS handshake with the origin server.
Fix / Meaning: Your server's SSL certificate is invalid or misconfigured.
526 CODE

526 Invalid SSL Certificate (Cloudflare)

Cloudflare could not validate the SSL certificate on the origin web server.
Fix / Meaning: Full Strict SSL mode requires a valid certificate on the host.
529 CODE

529 Site is Overloaded

Used by Qualys in the SSLLabs server testing API to signal that the site can't process the request.
Fix / Meaning: The site is too busy right now.
530 CODE

530 Site is Frozen

Used by Pantheon web platform to indicate a site that has been frozen due to inactivity.
Fix / Meaning: The site has been paused or archived.
561 CODE

561 Unauthorized (AWS ELB)

An error around authentication through the load balancer.
Fix / Meaning: The AWS load balancer failed to authenticate the user with the configured identity provider.
598 CODE

598 Network Read Timeout Error

Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.
Fix / Meaning: The proxy server timed out waiting for the origin server to read data.
599 CODE

599 Network Connect Timeout Error

An error used by some HTTP proxies to signal a network connect timeout behind the proxy to a client in front of the proxy.
Fix / Meaning: The proxy server timed out trying to establish a connection to the origin server.

Complete Guide to HTTP Status Codes

Every time you visit a website, your browser and the server have a quick, invisible conversation. The server replies with a three-digit number known as an HTTP status code. Think of these codes as a short note attached to a package. They tell you if the delivery was successful (200 OK), if the address changed (301 Redirect), or if something went wrong along the way.

Most of the time, you won't see these codes because the page just loads. But when a website crashes or a link breaks, knowing these numbers is the only way to figure out why it happened and how to fix it.

The 5 Types of Response Codes (Cheat Sheet)

The first digit of the code tells you who is responsible for the result. Here is the easiest way to remember them:

  • 1xx (Info): "Hold on." The server received the request and is still processing it. You almost never see these in a web browser.
  • 2xx (Success): "Here you go." The request worked perfectly. The server sent the data you asked for.
  • 3xx (Redirect): "Go here instead." The file has moved to a new address. Your browser will automatically take you to the new URL.
  • 4xx (Client Error): "You messed up." This is usually a user error. It means you clicked a broken link, typed a URL wrong, or don't have permission to view the page.
  • 5xx (Server Error): "I messed up." This is a server error. The website code crashed, the database is down, or the server is overloaded.

Do Status Codes Affect SEO?

Yes, they are huge for SEO. Search engines like Google use these codes to decide how to rank your site.

  • 200 OK: Tells Google "This page is good, index it."
  • 301 Redirect: Tells Google "We moved this page forever. Please pass all our ranking power to the new URL."
  • 404 Not Found: If Google sees too many of these, it might stop visiting your site as often (wasting your "crawl budget").
  • 500 Errors: These are dangerous. If Google sees a 500 error consistently, it will drop the page from search results quickly because it thinks the site is broken.

Best Status Codes for REST APIs

If you are building a REST API, you don't need to use every code. Stick to these standard responses:

  • GET (Read): 200 OK (Success) or 404 Not Found.
  • POST (Create): 201 Created.
  • PUT/PATCH (Update): 200 OK or 204 No Content.
  • DELETE: 200 OK or 204 No Content.
  • Validation Errors: 400 Bad Request or 422 Unprocessable Entity.

How to Set HTTP Status Codes in Code

Here is how to manually return a status code (like a 404 Not Found or 500 Server Error) in popular backend languages and frameworks:

PHP (Native)
http_response_code(404);
echo "Page not found";
exit;
Node.js (Express)
res.status(404).send('Page not found');
Python (Flask)
return "Page not found", 404

Common Questions & Troubleshooting

1. What is the difference between a 404 and a 500 error?
It comes down to whose fault it is. A 404 Not Found means the server is working fine, but the specific page you want isn't there (like dialing a wrong phone number). A 500 Internal Server Error means the server itself crashed or has a bug (like the phone line being dead).

2. How do I fix a 502 Bad Gateway?
A 502 means one server (like a load balancer or Cloudflare) tried to talk to the main server, but got a bad response.
The Fix: If you are a user, refresh the page. If you are the website owner, check your firewall settings and make sure your backend service (like PHP-FPM) is running.

3. What is the difference between 301 and 302 redirects?
A 301 is permanent. It tells Google to forget the old URL and give all credit to the new one. A 302 is temporary. It tells Google "keep the old URL in your memory, we are just moving this for a short time."

4. Why am I getting a 403 Forbidden error?
This means the server hears you, but it refuses to let you in. This often happens if you try to view a sensitive file (like .htaccess), or if your IP address was blocked by a security plugin.

5. What is error 418 "I'm a teapot"?
This is a famous internet joke from 1998. It technically means "The server refuses to brew coffee because it is a teapot." You will almost never see this in real life unless a developer put it there as an Easter Egg.

6. Why do I see 429 "Too Many Requests"?
This is a rate limit. It means you (or a bot on your network) are hitting the server too fast. Just wait a minute and try again.

7. What are Cloudflare 520, 521, and 522 errors?
These are custom codes used by Cloudflare. They usually mean Cloudflare can't connect to your web host.
The Fix: Check if your web host is offline, or if your firewall is accidentally blocking Cloudflare's IP addresses.

8. What is a "Soft 404"?
This happens when a page says "Not Found" on the screen, but the server accidentally sends a "200 OK" code. This is bad for SEO because Google thinks it's a real page. You should always ensure your error pages send an actual 404 header.

9. How do I check the status code of a page?
You don't need a special tool. Just right-click anywhere on the page, select Inspect, go to the Network tab, and refresh the page. The first item in the list will show the status code (like 200 or 404).

10. What is the difference between 401 Unauthorized and 403 Forbidden?
A 401 Unauthorized means "I don't know who you are" (you need to log in). A 403 Forbidden means "I know who you are, but you aren't allowed in" (you lack admin or viewing permissions).

11. How do I find 404 errors on my website?
The easiest way is to use Google Search Console. Go to the "Pages" report and look for "Not found (404)". You can also check your server's access logs or run a broken link checker tool.

12. What is a 204 No Content response used for?
A 204 means the server did what you asked, but it has nothing to send back. This is very common in REST APIs when you delete an item, or when a webpage saves your progress in the background without needing to refresh the screen.