Back to homepage

http status code

βœ… HTTP Status Codes Overview

HTTP status codes are grouped by their first digit:

RangeTypeResponsibility
1xxInformationalOngoing communication
2xxSuccessEverything is OK
3xxRedirectionFurther action needed
4xxClient Error⚠️ Your (client’s) fault
5xxServer ErrorπŸ’₯ Server's fault

βœ… 2xx β€” Success Responses

These mean:

βœ… β€œEverything worked!” β€” the server understood and processed your request successfully.

CodeNameMeaning
200OKStandard response for a successful request. Everything is fine.
201CreatedA new resource was successfully created (e.g., after a POST).
202AcceptedRequest accepted for processing, but not completed yet (e.g., queued).
203Non-Authoritative InfoServer returned info from a third party (e.g., proxy), not original source.
204No ContentSuccess, but nothing to return in the body. Often used in DELETEs.
205Reset ContentTells client to reset the form/view. Rare.
206Partial ContentPartial response (e.g., used for range requests β€” like video streaming).

🧠 These are your happy codes β€” everything worked, and your app can proceed.


πŸ” 3xx β€” Redirection Responses

These mean:

πŸ“ β€œYou’re in the right direction, but need to go somewhere else to complete it.”

CodeNameMeaning
300Multiple ChoicesSeveral options for the resource (e.g., language versions).
301Moved PermanentlyResource moved forever to a new URL. Update bookmarks.
302Found (Temp Redirect)Temporarily moved. Come back to the original URL next time.
303See OtherRedirect to another URI using a GET request. Common after POSTs.
304Not ModifiedResource not changed since last request. Use your cache.
305Use Proxy (Deprecated)Use a proxy to access this resource. Almost always ignored today.
306(Unused)Reserved but not used anymore.
307Temporary RedirectLike 302, but preserves method (e.g., POST stays POST).
308Permanent RedirectLike 301, but preserves method.

🧭 These codes tell the browser or client where to go next β€” either temporarily or permanently.

πŸ”΄ 4xx β€” Client Error Responses

These mean you (the client) did something wrong. Examples:

CodeNameMeaning
400Bad RequestYour request is malformed (e.g., bad JSON, missing parameters).
401UnauthorizedYou need to authenticate (e.g., missing/invalid token).
403ForbiddenYou're authenticated but not allowed to access the resource.
404Not FoundThe requested resource doesn’t exist.
405Method Not AllowedYou used the wrong HTTP method (e.g., POST instead of GET).
422Unprocessable EntitySemantically correct but invalid data (common in APIs).
429Too Many RequestsYou're being rate-limited (too many requests in a short time).

🧠 These errors usually mean you need to fix the request β€” your app, form, or client made a mistake.


πŸ”₯ 5xx β€” Server Error Responses

These mean the server failed while trying to process a valid request.

CodeNameMeaning
500Internal Server ErrorA generic error β€” the server crashed or had an unexpected issue.
501Not ImplementedServer doesn't support the request method or functionality.
502Bad GatewayA proxy/gateway received an invalid response from upstream.
503Service UnavailableServer is down or overloaded. Retry later.
504Gateway TimeoutTimeout from upstream server β€” the backend took too long.

⚠️ These errors are not your fault as the client β€” the server or its configuration needs to be fixed.


πŸ” Summary: Who Needs to Act?

Code TypeMeaningWho Acts?
2xxβœ… SuccessYou (client) can proceed
3xxπŸ” RedirectionBrowser/client must follow
4xx❌ Client ErrorYou (client) must fix request
5xxπŸ’₯ Server ErrorServer must fix the issue

βœ… Real-World Developer Tips

  • : βœ… Most common for GETs, success in general.

  • : πŸ”§ Used after creating something via POST.

  • : πŸ—‘οΈ Used when deleting or toggling status β€” no need for body.

  • : πŸ” Good for SEO β€” permanent redirects.

  • : πŸ” Good for temporary testing or login flows.

  • : ⚑ Improves performance by using cache.