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

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

Status codes are defined in RFC 9110, the current specification of HTTP semantics, plus a few later RFCs. Browsers mostly hide them, but they decide how search engines index your pages, how caches behave and how API clients react. This guide lists the codes you will actually meet, then covers redirect choices for SEO and how to fix the common errors.

How to see a status code

In a browser, open the developer tools (F12), go to the Network tab and reload: the Status column shows the code for every request. From a terminal, curl prints the response headers:

$ 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 shows the status line and headers for any URL, and the redirect checker follows every hop of a redirect chain and shows each code.

1xx: Informational

Interim responses sent before the final one. Most users never see them.

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 happens when the browser sends If-None-Match or If-Modified-Since with a cached copy and the server confirms nothing has changed. It saves bandwidth and is a sign that caching works.

4xx: Client errors

The request was wrong or not allowed. Retrying the same request will normally fail 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 may have been valid, but the server, or something behind it, failed.

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. Check whether the problem is global or local with our Is It Down checker.
  2. On the server, confirm the application process is running and listening on the port the proxy expects, for example with ss -tlnp.
  3. Read the proxy's error log (such as the nginx error.log). "Connection refused" points to a stopped app, "upstream timed out" to a slow one.
  4. For 504s, find the slow request and fix it, rather than just raising the proxy timeout.
  5. For 503s, check resource limits: worker counts, memory and connection pools.

Choosing redirects for SEO

Search engines treat permanent and temporary redirects differently. Google documents that it treats 301 and 308 as strong signals that the target should be indexed instead of the old URL, while 302 and 307 are treated as weak signals that the original URL should stay indexed.

  • Use 301 or 308 for permanent moves: changing domains, switching from HTTP to HTTPS, restructuring URLs, or merging two pages. Use 308 when the redirect must keep POST requests intact, such as API endpoints.
  • Use 302 or 307 for genuinely temporary situations: an A/B test, a short promotion, or sending users to a maintenance page.
  • Do not leave a 302 in place for a permanent move. Search engines may eventually treat a long-standing temporary redirect as permanent, but the signal is slower and less reliable.
  • Avoid chains. Redirect http://example.com directly to https://www.example.com/ in one hop, rather than going through https://example.com first. Check with the redirect checker.

Soft 404s

A soft 404 is a page that says "not found" or is essentially empty, but returns 200 OK. Search engines may keep it in the index or waste crawl time on it, and Google Search Console reports these pages separately. Make sure your error page returns a real 404 status, and avoid redirecting every missing URL to the homepage, which search engines also tend to treat as a soft 404.

404 vs 410

Both tell search engines the page is not there, and both lead to it being dropped from the index. A 410 states that the removal is intentional, which can make crawlers stop requesting it a little sooner. Use 410 for content you have deliberately and permanently deleted, and 404 for everything else. If a page has a close replacement, a 301 to that page is better than either.

Tip: For planned maintenance, return 503 with a Retry-After header rather than a 200 page that says "down for maintenance". Crawlers will retry later instead of indexing the maintenance message. Long-lasting 5xx errors, however, can lead to pages being dropped.

Frequently asked questions

What is the difference between 401 and 403?

401 means you need to authenticate, or your credentials were rejected; logging in may fix it. 403 means the server refuses the request regardless, so logging in will not help unless your account gains the permission.

Is a 304 status an error?

No. It tells the browser to use its cached copy because nothing changed. It is a normal sign of efficient caching.

Why do I get a 429 error?

You or your IP address sent too many requests in a short time. Wait for the period given in Retry-After. On shared connections, such as offices or carrier-grade NAT, other users' traffic can count against the same limit.

Does a 301 redirect pass SEO value?

Yes. Google has stated that 3xx redirects do not lose PageRank, and a permanent redirect consolidates signals onto the target URL. Keep redirects in place for at least a year after a site move.

Try it yourself

Put this guide into practice with our free tools.

Keep reading

Copied to clipboard