HTTP Status Codes Explained: 200, 301, 404, 500 and More

RSS

An HTTP status code is just the three-digit number a web server hands back with every response to say what happened to the request. The first digit tells you the class: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error.

RFC 9110 — the current spec for HTTP semantics — defines these, along with a handful of later RFCs. Browsers tend to hide them from you, but don't let that fool you: they're quietly deciding how search engines index your pages, how caches behave, how API clients react to what you send back. This guide walks through the codes you'll actually run into, then gets into redirect choices for SEO and how to fix the errors that show up most.

How to see a status code

In a browser, just open the developer tools (F12), head to the Network tab and reload — the Status column shows the code for every single request. Prefer a terminal? curl prints the response headers for you:

$ curl -I https://example.com/old-page

HTTP/2 301
location: https://example.com/new-page
cache-control: max-age=3600

Our HTTP headers checker will pull the status line and headers for any URL you give it, and the redirect checker follows every hop of a redirect chain, showing each code along the way.

1xx: Informational

Just interim responses sent before the real one arrives. Most people never even know they happened.

CodeNameMeaning
100ContinueThe server has received the request headers and the client may send the body. Used with Expect: 100-continue before large uploads.
101Switching ProtocolsThe server agrees to change protocol, most commonly when upgrading to a WebSocket connection.
103Early HintsSends Link headers early so the browser can start preloading CSS or fonts while the server prepares the page.

2xx: Success

CodeNameMeaning
200OKThe request succeeded and the response contains the result.
201CreatedA new resource was created, typically after a POST to an API. The Location header points to it.
202AcceptedThe request was queued for processing but is not finished yet.
204No ContentSuccess with no response body, common for DELETE requests and form auto-saves.
206Partial ContentOnly part of the file was sent, in response to a Range header. Used for resumable downloads and video seeking.

3xx: Redirection

CodeNamePermanent?Method preserved?
301Moved PermanentlyYesNot guaranteed: clients may change POST to GET
302FoundNoNot guaranteed: clients may change POST to GET
303See OtherNoNo: always followed with GET, used after form submissions
304Not ModifiedNot a redirectThe cached copy is still valid; no body is sent
307Temporary RedirectNoYes
308Permanent RedirectYesYes

A 304 shows up when the browser sends If-None-Match or If-Modified-Since alongside a cached copy, and the server confirms nothing's changed since. That saves bandwidth, and honestly, seeing one is a good sign — it means caching is doing its job.

4xx: Client errors

Something about the request itself was wrong, or just not allowed. Retry it unchanged and you'll almost certainly get the same result again.

CodeNameMeaning
400Bad RequestMalformed syntax, invalid JSON, or oversized or corrupted cookies.
401UnauthorizedAuthentication is required or failed. Despite the name, it means "unauthenticated".
403ForbiddenThe server knows who you are (or does not care) and refuses access, for example because of file permissions, an IP block or a firewall rule.
404Not FoundNothing exists at this URL.
405Method Not AllowedThe URL exists but does not accept this method, such as POST to a read-only page.
408Request TimeoutThe client took too long to send the request.
409ConflictThe request conflicts with the current state, such as an edit to an outdated version.
410GoneThe resource was deliberately removed and will not return.
413Content Too LargeThe upload exceeds the server's limit.
418I'm a teapotAn April Fools' joke from RFC 2324 (1998). RFC 9110 marks 418 as reserved so it is not reused, and some sites return it playfully, for example to block bots.
422Unprocessable ContentWell-formed but semantically invalid input, common in API validation errors.
429Too Many RequestsRate limit exceeded (RFC 6585). A Retry-After header says how long to wait.
451Unavailable For Legal ReasonsBlocked because of a legal demand, such as a court order or regional law (RFC 7725). The number references the novel Fahrenheit 451.

5xx: Server errors

The request itself might have been perfectly fine — it's the server, or something sitting behind it, that fell over.

CodeNameTypical cause
500Internal Server ErrorAn unhandled exception or misconfiguration in the application. Check the application's error log.
501Not ImplementedThe server does not support the requested method at all.
502Bad GatewayA proxy, load balancer or CDN got an invalid response, or none, from the upstream server: the app crashed, refused the connection or closed it early.
503Service UnavailableThe server is overloaded or in maintenance. Should include Retry-After when the downtime is planned.
504Gateway TimeoutThe proxy reached the upstream server, but it did not answer in time, often because of a slow database query or a long-running request.

Troubleshooting 502, 503 and 504

  1. First, figure out whether it's everyone seeing this or just you — our Is It Down checker settles that quickly.
  2. On the server itself, make sure the application process is actually running and listening on the port your proxy expects — ss -tlnp will show you.
  3. Go read the proxy's error log (nginx's error.log, for instance). "Connection refused" means the app has stopped; "upstream timed out" means it's just slow.
  4. Got a 504? Track down the slow request and fix that — don't just crank up the proxy timeout and call it solved.
  5. Seeing 503s? Check your resource limits: worker counts, memory, connection pools.

Choosing redirects for SEO

Search engines really don't treat permanent and temporary redirects the same way. Google says outright that it reads 301 and 308 as a strong signal the target URL should be indexed in place of the old one — while 302 and 307 are read as weak signals, meaning the original URL stays the one that gets indexed.

  • Reach for 301 or 308 when a move is genuinely permanent: a domain change, moving from HTTP to HTTPS, restructuring your URLs, merging two pages into one. 308 is the one you want when POST requests need to survive the redirect intact, like with API endpoints.
  • 302 or 307 are for things that are actually temporary: an A/B test, a short-lived promotion, bouncing users to a maintenance page for a bit.
  • Don't leave a 302 sitting on a permanent move. Search engines might eventually start treating a long-lived "temporary" redirect as permanent anyway, but that signal is slow and nowhere near as reliable.
  • Watch out for chains. Send http://example.com straight to https://www.example.com/ in a single hop — don't route it through https://example.com first. The redirect checker will catch this for you.

Soft 404s

A soft 404 is a page that claims "not found," or is basically empty, yet still returns 200 OK. Search engines might just keep it indexed anyway, or burn crawl budget on it pointlessly — and Google Search Console flags these pages separately for exactly that reason. Make sure your error page actually returns a real 404, and resist the urge to redirect every missing URL to the homepage; search engines tend to call that a soft 404 too.

404 vs 410

Both tell search engines the page is gone, and both get it dropped from the index eventually. The difference? A 410 says the removal was intentional, which can nudge crawlers into giving up on it a bit sooner. Use 410 for things you deliberately and permanently deleted, 404 for everything else. And if there's a close replacement page available, a 301 beats either one.

Tip: Doing planned maintenance? Return 503 with a Retry-After header instead of a plain 200 page that just says "down for maintenance." That way crawlers retry later rather than indexing your maintenance message as real content. Just don't let 5xx errors drag on too long — that's how pages start getting dropped.

Frequently asked questions

What is the difference between 401 and 403?

401 means you need to authenticate, or that your credentials got rejected — logging in might well fix it. 403 is blunter: the server's refusing the request no matter what, so logging in won't help unless your account actually gains the permission it's missing.

Is a 304 status an error?

Not at all. It's just telling the browser to use what it already has cached, since nothing's changed. That's efficient caching working exactly as intended.

Why do I get a 429 error?

You, or your IP address, sent too many requests in too short a window. Wait out whatever period Retry-After gives you. And on a shared connection — an office network, say, or carrier-grade NAT — someone else's traffic can eat into the same limit without you doing anything wrong.

Does a 301 redirect pass SEO value?

Yes. Google's own statements confirm 3xx redirects don't lose PageRank, and a permanent redirect consolidates its signals onto the target URL. Just keep the redirects in place for at least a year after any site move.

Попробуйте сами

Примените это руководство на практике с помощью наших бесплатных инструментов.

Комментарии

Поделитесь советом, задайте вопрос или расскажите, как вам помог инструмент.

Читать далее

Скопировано в буфер обмена