Every time your browser, an app or a tool like curl asks a web server for something, the server answers with a three-digit HTTP status code. It says whether the request worked, was redirected, or failed, and whose fault the failure was. This page lists the HTTP status codes you’ll actually meet, what each one means, and links to our step-by-step fix guides for the common errors.
The Five Classes of HTTP Status Codes
The first digit of the code tells you its class:
| Class | Meaning | In short |
|---|---|---|
| 1xx | Informational | “Got it, keep going.” |
| 2xx | Success | “Here you go.” |
| 3xx | Redirection | “Look over there.” |
| 4xx | Client error | “Your request has a problem.” |
| 5xx | Server error | “I have a problem.” |
The codes are defined by the IETF, mainly in RFC 9110 (HTTP Semantics), with a few in other RFCs such as RFC 6585 (which added 429). Clients that see a code they don’t recognise treat it like the x00 code of its class, so an unknown 4xx code is handled like 400.
How to Check a URL’s Status Code
Use curl to see the status code of any URL:
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/curl -I https://example.com/curl -sIL https://example.com/old-page/ | grep -i "^HTTP\|^location"
The first command prints just the code, the second prints the response headers, and the third follows redirects and shows each step. In a browser, open Developer Tools → Network and reload the page to see the status of every request. More examples are in our guide on checking HTTP status codes with curl.
1xx Informational
| Code | Name | Meaning |
|---|---|---|
| 100 | Continue | The server got the request headers; the client can send the body. Used with Expect: 100-continue for large uploads. |
| 101 | Switching Protocols | The server is switching protocols as asked, most often to WebSocket. |
| 103 | Early Hints | Sent before the final response so the browser can start preloading CSS, fonts or scripts. |
2xx Success
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | The request worked. The standard response for a page or API call. |
| 201 | Created | A new resource was created, usually after a POST. The Location header often points to it. |
| 202 | Accepted | The request was accepted for processing, but isn’t finished yet (background jobs). |
| 204 | No Content | Success, with nothing to return. Common for DELETE requests and form saves. |
| 206 | Partial Content | Only part of the file was sent, as asked with a Range header. Used for resumable downloads and video streaming. |
3xx Redirection
| Code | Name | Meaning |
|---|---|---|
| 301 | Moved Permanently | The page has a new permanent URL. Search engines move rankings to it. Browsers may change POST to GET when following it. |
| 302 | Found | A temporary redirect. Keep using the original URL. |
| 303 | See Other | Go to another URL with GET, typically after a form submission. |
| 304 | Not Modified | The cached copy is still valid; no body is sent. Saves bandwidth. |
| 307 | Temporary Redirect | Like 302, but the method and body must not change (POST stays POST). |
| 308 | Permanent Redirect | Like 301, but the method and body must not change. |
For setting up redirects, see 301 redirects with .htaccess, redirecting HTTP to HTTPS in Nginx and in Apache.
4xx Client Errors
| Code | Name | Meaning |
|---|---|---|
| 400 | Bad Request | The request is malformed: bad syntax, cookies too large, invalid JSON. |
| 401 | Unauthorized | Authentication is needed, or the credentials are wrong or expired. |
| 402 | Payment Required | Reserved. Some APIs use it when a payment or plan upgrade is needed. |
| 403 | Forbidden | The server refuses access, usually because of permissions or access rules. |
| 404 | Not Found | Nothing exists at this URL. |
| 405 | Method Not Allowed | The URL exists but doesn’t accept this method (for example POST to a GET-only page). See fixing 405 in ASP.NET Core and IIS. |
| 406 | Not Acceptable | The server can’t return the format asked for in the Accept headers. Also sent by some security modules. |
| 408 | Request Timeout | The client took too long to send the request. |
| 409 | Conflict | The request conflicts with the current state, for example a duplicate record or an edit conflict. |
| 410 | Gone | The page was removed on purpose and won’t return. |
| 411 | Length Required | The request needs a Content-Length header. |
| 413 | Content Too Large | The request body (such as an upload) is bigger than the server allows. In Nginx, raise client_max_body_size. |
| 414 | URI Too Long | The URL is longer than the server accepts, often caused by huge query strings or redirect loops that keep adding parameters. |
| 415 | Unsupported Media Type | The body’s format (its Content-Type) isn’t supported. |
| 418 | I’m a teapot | An April Fools’ joke from RFC 2324. Some sites use it for blocked bots. |
| 422 | Unprocessable Content | The request is well-formed but its data fails validation. Common in APIs. |
| 429 | Too Many Requests | Rate limit reached. Slow down and retry later. |
| 431 | Request Header Fields Too Large | The headers (often cookies) are too large. |
| 451 | Unavailable For Legal Reasons | Blocked because of a legal demand, such as a court order or government censorship. |
5xx Server Errors
| Code | Name | Meaning |
|---|---|---|
| 500 | Internal Server Error | A generic server or application error. |
| 501 | Not Implemented | The server doesn’t support the method or feature requested. |
| 502 | Bad Gateway | A proxy got an invalid response from the backend (often PHP-FPM or an app server that’s down). |
| 503 | Service Unavailable | The server is overloaded, in maintenance or rate-limiting. Temporary. |
| 504 | Gateway Timeout | A proxy waited too long for the backend. |
| 505 | HTTP Version Not Supported | The server doesn’t support the HTTP version used. |
| 507 | Insufficient Storage | The server can’t store what’s needed (WebDAV). |
| 511 | Network Authentication Required | You must log in to the network first, as with hotel or airport Wi-Fi portals. |
Non-Standard Codes You May See
Some servers and CDNs use their own codes. They’re not part of the HTTP standard but show up often in logs:
| Code | Used by | Meaning |
|---|---|---|
| 444 | Nginx | No response. Nginx closed the connection without replying. Used with return 444; to drop bad bots. |
| 494 | Nginx | Request header too large (shown to the client as 400). |
| 495, 496, 497 | Nginx | Client certificate errors, and an HTTP request sent to an HTTPS port (shown as 400). |
| 499 | Nginx | Client closed the request before the server answered. Common with slow backends and impatient clients. |
| 520–526 | Cloudflare | Problems between Cloudflare and your origin server: unknown error (520), origin down (521), connection timed out (522), origin unreachable (523), timeout after connecting (524) and SSL errors (525–526). |
Status Codes and SEO
- 200: the page can be indexed.
- 301 and 308: permanent moves. Search engines index the new URL and move signals to it. Use them when you change URLs.
- 302 and 307: temporary. Search engines usually keep the original URL indexed.
- 404 and 410: the URL is dropped from the index over time. That’s fine for content that’s really gone.
- 429, 500, 503: Google slows down crawling. If they last for days, URLs can be dropped. Use 503 for planned maintenance.
- “Soft 404”: a “not found” page that returns 200. Avoid it; return a real 404 instead.
Frequently Asked Questions
What are HTTP status codes?
They’re three-digit numbers a web server sends with every response to say whether the request succeeded, was redirected or failed. The first digit gives the class: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error.
What is the most common HTTP status code?
200 OK, which every successful page load returns. The most common errors are 404 Not Found and, on servers with problems, 500, 502 and 503.
What is the difference between 4xx and 5xx errors?
4xx errors mean the request was wrong: a bad URL, missing login or too many requests. 5xx errors mean the server failed to handle a valid request.
What is the difference between 301 and 302?
301 is a permanent redirect: search engines move the old URL’s ranking to the new one. 302 is temporary: the old URL stays indexed. Use 301 (or 308) when a page has moved for good.
How do I check a website’s HTTP status code?
Run curl -I https://example.com/ to see the status line and headers, or open the browser’s Developer Tools, go to the Network tab and reload the page.
Conclusion
HTTP status codes are a short, standard way for servers to say what happened to each request. You only need to remember a handful: 200 for success, 301 and 302 for redirects, 401, 403, 404 and 429 for client-side problems, and 500, 502, 503 and 504 for server-side ones. When you run into an error, check the exact code with curl, then follow the matching guide above to fix it.
How did it make you feel?
