Troubleshooting guide
HTTP status codes explained, with fixes for the common errors
Every HTTP response starts with a three-digit status code. The first digit tells you who has to act: the client, the server, or nobody. Here is what the codes you will actually meet mean, and where to go when one of them is an error.
5 min read10 sectionsUpdated
On this page
| Class | Meaning | Who acts |
|---|---|---|
| 1xx | Informational, such as 101 Switching Protocols for WebSockets | Nobody, usually invisible |
| 2xx | Success | Nobody |
| 3xx | Redirection: the resource is elsewhere | The client follows the Location header |
| 4xx | Client error: the request was wrong or not allowed | The client changes the request |
| 5xx | Server error: a valid request failed on the server | The server owner fixes it |
| Code | Name | What it usually means |
|---|---|---|
| 200 | OK | Success. |
| 201 | Created | A resource was created, for example by a POST. |
| 204 | No Content | Success with an empty body. |
| 301 | Moved Permanently | Permanent redirect; search engines transfer the old URL's signals to the new one. |
| 302 / 307 | Found / Temporary Redirect | Temporary redirect; 307 keeps the method and body. |
| 304 | Not Modified | The cached copy is still valid. |
| 308 | Permanent Redirect | Permanent, keeping the method and body. |
| 400 | Bad Request | Malformed request: invalid JSON, a missing field, a header that is too large. |
| 401 | Unauthorized | No or invalid credentials. |
| 403 | Forbidden | Valid request, refused. [How to fix 403](/guides/403-forbidden). |
| 404 | Not Found | No resource at this URL. |
| 405 | Method Not Allowed | The URL exists but not for this method, such as GET on a POST-only endpoint. |
| 408 | Request Timeout | The client took too long to send the request. |
| 409 | Conflict | The request conflicts with the current state, such as a duplicate or a version mismatch. |
| 410 | Gone | Removed on purpose; search engines drop it faster than a 404. |
| 413 | Content Too Large | The body exceeds the server's limit. |
| 422 | Unprocessable Content | Well-formed but invalid data, common in APIs. |
| 429 | Too Many Requests | Rate limited. [How to fix 429](/guides/429-too-many-requests). |
| 500 | Internal Server Error | An unhandled error on the server. [How to fix 500](/guides/500-internal-server-error). |
| 502 | Bad Gateway | A proxy got an invalid response from the upstream. [How to fix 502](/guides/502-bad-gateway). |
| 503 | Service Unavailable | Overloaded or in maintenance. [How to fix 503](/guides/503-service-unavailable). |
| 504 | Gateway Timeout | A proxy waited too long for the upstream. [How to fix 504](/guides/504-gateway-timeout). |
| 520 to 524 | Cloudflare origin errors | Cloudflare could not get a good response from your server: [520](/guides/cloudflare-error-520), [521](/guides/cloudflare-error-521), [522](/guides/cloudflare-error-522), [524](/guides/cloudflare-error-524). |
Status codes and search engines
- Use 301 or 308 for permanent moves so rankings follow the page; avoid chains of redirects.
- Return a real 404 or 410 for missing pages. A "soft 404" (an error page with status 200) wastes crawl budget and confuses indexing.
- Keep 5xx errors short-lived. Crawlers back off when they meet repeated 5xx responses, and pages that keep failing can drop from the index.
- Prefer 429 or 503 with Retry-After to tell crawlers to slow down, rather than failing with 500.
Monitor the status code
An uptime monitor that expects a specific status (and optionally a keyword in the body) catches the failures a simple ping misses: a 500 on checkout, a 403 from a new firewall rule, a 302 to a login page after a configuration change. Pair it with alert rules per status class so the alert already says what kind of problem it is.
What is the difference between 4xx and 5xx?
4xx codes mean the request should change: it was malformed, unauthorised or too frequent. 5xx codes mean the request was fine and the server failed to handle it.
Is a 404 bad for SEO?
No. A real 404 for a page that does not exist is correct. Problems start with soft 404s (error pages returning 200) and with important pages that return 404 by mistake.
Which status codes should an uptime check accept?
Usually only 200 for a page, or the specific success code an API returns. Accepting every 2xx and 3xx can hide a redirect to a login or error page.
Check it now, free
- Website down checker: Is it down for everyone or just me? Check any site now.
- HTTP status codes: Every status code explained, with fix guides.
Related reading
- 401 Unauthorized: causes, fixes and how it differs from 403: Fix 401 Unauthorized errors: expired tokens, missing Authorization headers, proxies stripping credentials and clock skew, plus how 401 differs from 403.
- IPL live stream not working? Fixes for buffering and errors: Why IPL live streams buffer or fail during big matches, how to check if JioHotstar is down, and practical fixes for buffering, login and playback errors.
- How to monitor Netlify: How to monitor sites on Netlify: outside uptime checks, Netlify Functions errors, build failures, form and redirect problems, Core Web Vitals and alerts.
- 304 Not Modified: what it means: 304 Not Modified explained: ETag and Last-Modified validation, why it makes pages faster, and fixing stale content or 304s that never refresh.
- 400 Bad Request: what it means and how to fix it: Fix a 400 Bad Request error: oversized cookies, malformed URLs, invalid JSON bodies and proxy rules, with commands to find which layer rejected it.
- 422 Unprocessable Entity: how to fix it: Fix 422 Unprocessable Entity (Unprocessable Content): validation errors in APIs and forms, CSRF tokens in Rails and Laravel, and how to read the error body.
Watch your own site and services with VitalRix
Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.