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.
| Code | Name | Meaning |
|---|---|---|
| 100 | Continue | The server has received the request headers and the client may send the body. Used with Expect: 100-continue before large uploads. |
| 101 | Switching Protocols | The server agrees to change protocol, most commonly when upgrading to a WebSocket connection. |
| 103 | Early Hints | Sends Link headers early so the browser can start preloading CSS or fonts while the server prepares the page. |
2xx: Success
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | The request succeeded and the response contains the result. |
| 201 | Created | A new resource was created, typically after a POST to an API. The Location header points to it. |
| 202 | Accepted | The request was queued for processing but is not finished yet. |
| 204 | No Content | Success with no response body, common for DELETE requests and form auto-saves. |
| 206 | Partial Content | Only part of the file was sent, in response to a Range header. Used for resumable downloads and video seeking. |
3xx: Redirection
| Code | Name | Permanent? | Method preserved? |
|---|---|---|---|
| 301 | Moved Permanently | Yes | Not guaranteed: clients may change POST to GET |
| 302 | Found | No | Not guaranteed: clients may change POST to GET |
| 303 | See Other | No | No: always followed with GET, used after form submissions |
| 304 | Not Modified | Not a redirect | The cached copy is still valid; no body is sent |
| 307 | Temporary Redirect | No | Yes |
| 308 | Permanent Redirect | Yes | Yes |
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.
| Code | Name | Meaning |
|---|---|---|
| 400 | Bad Request | Malformed syntax, invalid JSON, or oversized or corrupted cookies. |
| 401 | Unauthorized | Authentication is required or failed. Despite the name, it means "unauthenticated". |
| 403 | Forbidden | The 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. |
| 404 | Not Found | Nothing exists at this URL. |
| 405 | Method Not Allowed | The URL exists but does not accept this method, such as POST to a read-only page. |
| 408 | Request Timeout | The client took too long to send the request. |
| 409 | Conflict | The request conflicts with the current state, such as an edit to an outdated version. |
| 410 | Gone | The resource was deliberately removed and will not return. |
| 413 | Content Too Large | The upload exceeds the server's limit. |
| 418 | I'm a teapot | An 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. |
| 422 | Unprocessable Content | Well-formed but semantically invalid input, common in API validation errors. |
| 429 | Too Many Requests | Rate limit exceeded (RFC 6585). A Retry-After header says how long to wait. |
| 451 | Unavailable For Legal Reasons | Blocked 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.
| Code | Name | Typical cause |
|---|---|---|
| 500 | Internal Server Error | An unhandled exception or misconfiguration in the application. Check the application's error log. |
| 501 | Not Implemented | The server does not support the requested method at all. |
| 502 | Bad Gateway | A 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. |
| 503 | Service Unavailable | The server is overloaded or in maintenance. Should include Retry-After when the downtime is planned. |
| 504 | Gateway Timeout | The 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
- Check whether the problem is global or local with our Is It Down checker.
- On the server, confirm the application process is running and listening on the port the proxy expects, for example with
ss -tlnp. - 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. - For 504s, find the slow request and fix it, rather than just raising the proxy timeout.
- 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.comdirectly tohttps://www.example.com/in one hop, rather than going throughhttps://example.comfirst. 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.
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.