Skip to content

HTTP Status Codes: Complete List with Meanings (1xx to 5xx)

Complete list of HTTP status codes with meanings: 1xx, 2xx, 3xx redirects, 4xx client and 5xx server errors, plus Nginx and Cloudflare codes.

Category
Tech Basics
Covers
curl, Nginx
Versions & support
About Nginx →
On this page

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:

ClassMeaningIn short
1xxInformational“Got it, keep going.”
2xxSuccess“Here you go.”
3xxRedirection“Look over there.”
4xxClient error“Your request has a problem.”
5xxServer 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

CodeNameMeaning
100ContinueThe server got the request headers; the client can send the body. Used with Expect: 100-continue for large uploads.
101Switching ProtocolsThe server is switching protocols as asked, most often to WebSocket.
103Early HintsSent before the final response so the browser can start preloading CSS, fonts or scripts.

2xx Success

CodeNameMeaning
200OKThe request worked. The standard response for a page or API call.
201CreatedA new resource was created, usually after a POST. The Location header often points to it.
202AcceptedThe request was accepted for processing, but isn’t finished yet (background jobs).
204No ContentSuccess, with nothing to return. Common for DELETE requests and form saves.
206Partial ContentOnly part of the file was sent, as asked with a Range header. Used for resumable downloads and video streaming.

3xx Redirection

CodeNameMeaning
301Moved PermanentlyThe page has a new permanent URL. Search engines move rankings to it. Browsers may change POST to GET when following it.
302FoundA temporary redirect. Keep using the original URL.
303See OtherGo to another URL with GET, typically after a form submission.
304Not ModifiedThe cached copy is still valid; no body is sent. Saves bandwidth.
307Temporary RedirectLike 302, but the method and body must not change (POST stays POST).
308Permanent RedirectLike 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

CodeNameMeaning
400Bad RequestThe request is malformed: bad syntax, cookies too large, invalid JSON.
401UnauthorizedAuthentication is needed, or the credentials are wrong or expired.
402Payment RequiredReserved. Some APIs use it when a payment or plan upgrade is needed.
403ForbiddenThe server refuses access, usually because of permissions or access rules.
404Not FoundNothing exists at this URL.
405Method Not AllowedThe 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.
406Not AcceptableThe server can’t return the format asked for in the Accept headers. Also sent by some security modules.
408Request TimeoutThe client took too long to send the request.
409ConflictThe request conflicts with the current state, for example a duplicate record or an edit conflict.
410GoneThe page was removed on purpose and won’t return.
411Length RequiredThe request needs a Content-Length header.
413Content Too LargeThe request body (such as an upload) is bigger than the server allows. In Nginx, raise client_max_body_size.
414URI Too LongThe URL is longer than the server accepts, often caused by huge query strings or redirect loops that keep adding parameters.
415Unsupported Media TypeThe body’s format (its Content-Type) isn’t supported.
418I’m a teapotAn April Fools’ joke from RFC 2324. Some sites use it for blocked bots.
422Unprocessable ContentThe request is well-formed but its data fails validation. Common in APIs.
429Too Many RequestsRate limit reached. Slow down and retry later.
431Request Header Fields Too LargeThe headers (often cookies) are too large.
451Unavailable For Legal ReasonsBlocked because of a legal demand, such as a court order or government censorship.

5xx Server Errors

CodeNameMeaning
500Internal Server ErrorA generic server or application error.
501Not ImplementedThe server doesn’t support the method or feature requested.
502Bad GatewayA proxy got an invalid response from the backend (often PHP-FPM or an app server that’s down).
503Service UnavailableThe server is overloaded, in maintenance or rate-limiting. Temporary.
504Gateway TimeoutA proxy waited too long for the backend.
505HTTP Version Not SupportedThe server doesn’t support the HTTP version used.
507Insufficient StorageThe server can’t store what’s needed (WebDAV).
511Network Authentication RequiredYou 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:

CodeUsed byMeaning
444NginxNo response. Nginx closed the connection without replying. Used with return 444; to drop bad bots.
494NginxRequest header too large (shown to the client as 400).
495, 496, 497NginxClient certificate errors, and an HTTP request sent to an HTTPS port (shown as 400).
499NginxClient closed the request before the server answered. Common with slow backends and impatient clients.
520–526CloudflareProblems 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.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top