What Are HTTP Status Codes?
Every time a browser, app or API client makes a request to a web server, the server replies with a three-digit HTTP status code that summarises the result: success, redirection or error. Most of the time you never see them. The browser quietly follows redirects and shows the page. But when something goes wrong, codes like 404 Not Found or 500 Internal Server Error appear, and developers rely on them constantly when building and debugging websites and APIs.
This HTTP status code lookup explains every standard code in plain English, with the most common causes and practical fixes, so you can diagnose problems quickly, whether you're a developer, a site owner, an SEO specialist or a curious visitor.
The Five Classes of Status Codes
| Class | Meaning | Examples |
|---|---|---|
| 1xx Informational | The request was received, and processing continues | 100 Continue, 101 Switching Protocols |
| 2xx Success | The request succeeded | 200 OK, 201 Created, 204 No Content |
| 3xx Redirection | The client must go somewhere else | 301, 302, 304 Not Modified |
| 4xx Client error | The request has a problem | 400, 401, 403, 404, 429 |
| 5xx Server error | The server failed to handle a valid request | 500, 502, 503, 504 |
How to Use the Lookup
- Type a code (e.g.
403), a class pattern (5xx) or a keyword (redirect,timeout,cloudflare). - Filter by class, and choose whether to include unofficial vendor codes.
- Open a code to read its meaning, common causes, what to do, and where it's defined.
- Share a code: add
#404to this page's address to open it directly.
Status Codes and SEO
- 301 vs 302: use 301 (or 308) for permanent moves, so search engines transfer rankings to the new URL. Use 302 or 307 only for genuinely temporary redirects.
- 404 vs 410: both remove a page from search results. 410 signals deliberate removal and is processed faster.
- Soft 404s: a "not found" page that returns 200 confuses search engines. Always return a real 404 status.
- 503 for maintenance: it tells crawlers to come back later, instead of dropping your pages. Add a Retry-After header.
- Redirect chains slow down crawling and users, so point old URLs directly to the final destination.
Troubleshooting 5xx Errors
For 500, check the application and server error logs for the underlying exception. For 502 Bad Gateway, make sure the upstream app server (PHP-FPM, Node, Gunicorn and so on) is running and responding, and check your reverse proxy's upstream address. For 504 Gateway Timeout, look for slow database queries or external API calls, and move long tasks to background jobs. Cloudflare's 52x codes point to problems between Cloudflare and your origin server.
Choosing Status Codes for Your API
A well-designed REST API uses status codes consistently: 200 for successful reads and updates, 201 with a Location header when creating resources, 204 for successful deletes, 400 for malformed requests, 401 when credentials are missing or invalid, 403 for authenticated users without permission, 404 for unknown resources, 409 for conflicts, 422 for validation errors, 429 for rate limits, and 500 only for genuine server bugs. Always include a helpful JSON error body explaining what went wrong.
Retrying Failed Requests
Client code should retry only when a retry can succeed: network errors, 408, 429, 502, 503 and 504. Use exponential backoff with some randomness, and respect the Retry-After header when present. Never automatically retry 4xx errors like 400, 401 or 404, because the same request will fail again.
Frequently Asked Questions
Which status code should a custom error page return?
The real error code: 404 for missing pages and 500 for server errors. Never return 200 for an error page.
What does a 502 Bad Gateway mean for visitors?
The site's server or its upstream service is having problems. Wait a moment and reload, because it's usually temporary.
What's the difference between 401 and 403?
401 means you're not authenticated (log in). 403 means you're authenticated, or it doesn't matter, but you're not allowed.
Is a 304 an error?
No. It means your cached copy is still fresh, which saves bandwidth.
What does 429 mean?
You've hit a rate limit. Wait, respect Retry-After, and reduce request frequency.
What is error 499?
An nginx-specific code meaning the client closed the connection before the server responded.
How do I check a page's status code?
Open your browser's developer tools, go to the Network tab and reload, or run curl -I https://example.com.