·6 min read·Blog

HTTP Status Codes Explained: 200, 301, 404, 500 and the Rest

Every HTTP response carries a 3-digit status code. Here's what the five families mean, the codes you actually encounter in API debugging and SEO, and the differences that matter.

The five families

HTTP status codes are grouped by their first digit:

  • 1xx — Informational: Request received, continuing process. Rarely seen in practice.
  • 2xx — Success: The request was successfully received, understood, and accepted.
  • 3xx — Redirection: Further action needed to complete the request.
  • 4xx — Client error: The request contained bad syntax or cannot be fulfilled.
  • 5xx — Server error: The server failed to fulfill a valid request.

2xx — Success codes

CodeNameWhen it's used
200OKStandard success — GET and POST responses
201CreatedPOST created a new resource (e.g., new user, new post)
204No ContentSuccess but no response body — DELETE, some PUTs
206Partial ContentRange request — video streaming, resumable downloads

3xx — Redirects (and why 301 vs 302 matters)

CodeNameSEO/behavior
301Moved PermanentlyGoogle transfers most link equity. Browser caches the redirect.
302Found (Temporary)Google keeps original URL indexed. Link equity not transferred.
307Temporary RedirectLike 302 but preserves HTTP method (POST stays POST)
308Permanent RedirectLike 301 but preserves HTTP method

The 301 vs 302 SEO rule:Use 301 when you've permanently moved a URL — Google will update its index and transfer PageRank. Use 302 for temporary redirects (A/B tests, maintenance pages, login redirects). Using 302 when you mean 301 causes Google to keep indexing the old URL indefinitely.

The 301 browser cache problem: 301s are cached aggressively by browsers. If you redirect A → B using 301 and later need A to go somewhere else, users who visited before will see the cached old redirect until they clear their cache. Use 302 during testing; switch to 301 when permanent.

4xx — Client errors

CodeNameWhen it occurs
400Bad RequestMalformed request syntax — bad JSON body, missing required field
401UnauthorizedNot authenticated — no token or invalid token
403ForbiddenAuthenticated but not authorized — wrong role, wrong permissions
404Not FoundResource doesn't exist at this URL
405Method Not AllowedPOST to a GET-only endpoint
409ConflictResource conflict — duplicate email, version mismatch
410GoneResource permanently deleted — tells Google to deindex faster
422Unprocessable EntityRequest is syntactically valid but semantically invalid
429Too Many RequestsRate limit exceeded — API throttling

401 vs 403:401 means "you need to log in." 403 means "you are logged in but not allowed." Returning 403 for unauthenticated users reveals that a resource exists — some APIs return 404 for security-sensitive resources even when the issue is authentication.

404 vs 410 for SEO:404 tells Google "this page isn't found — try again later." 410 tells Google "this page is permanently gone — remove it from the index." If you delete a URL permanently, 410 accelerates deindexing compared to 404.

5xx — Server errors

CodeNameTypical cause
500Internal Server ErrorUnhandled exception — check server logs
502Bad GatewayReverse proxy got invalid response from upstream
503Service UnavailableServer overloaded or down for maintenance
504Gateway TimeoutUpstream server didn't respond in time

502 vs 504:Both involve a reverse proxy (nginx, Cloudflare) failing to communicate with an upstream service. 502 means the upstream returned something invalid; 504 means it didn't respond at all (timeout). Both are usually caused by the upstream service crashing or being overloaded — not the proxy itself.

Debugging with JSON in API responses

Most REST APIs include a JSON body with error details alongside the status code. Format any API JSON error response for readability with the free JSON formatter — paste the response body and instantly see the error structure.

Related tools


Written by Achraf A., founder of TheFreeAITools.

Browse by category

Not sure which tool you need? Start with a category.

Everything you can do — for free

No software to buy. No account to create. Just open a tool and get it done.

Work with images

Compress photos before sending them by email, resize pictures for social media, remove backgrounds, or pick the perfect color for a design project — all without installing any app.

Edit and format text

Count words and characters in an essay, compare two documents side by side, convert text to different formats, or generate placeholder text for a presentation.

Stay safe online

Create a strong unique password in one click, check how secure a password is, encode or decode data, and generate secure tokens — your data never leaves your device.

Calculate anything

BMI, loan repayments, unit conversions, date differences, and dozens of other everyday calculations — no spreadsheet or formula knowledge required.

The Free AI Tools is a free collection of 221+ online tools that work directly in your web browser — no download, no installation, no account required. Whether you need to compress an image for email, count words in an essay, generate a strong password, create a QR code for your business, or format JSON for development — you will find a simple, free tool here.

Every tool is privacy-first: your files, text, and data never leave your device. Tools cover image editing, text processing, developer utilities, security & encoding, SEO & web, design & CSS, and more.

☕ Support Us