HTTP status codes are the server’s one-line answer to “what happened to this URL?”. The list is long, but in day-to-day webmaster work you only ever meet about twenty of them. This cheat sheet covers those — grouped by class, with the traps that cost traffic and the commands to verify what a server really returns.
The cheat sheet: 1xx–5xx at a glance
| Code | Name | What it means in practice |
|---|---|---|
| 200 | OK | The page loaded. Check the content though: a 200 with “not found” text is a soft 404. |
| 204 | No Content | Success with an empty body — normal for APIs and ping endpoints, wrong for pages. |
| 301 | Moved Permanently | The URL lives elsewhere, forever. Search engines replace the old URL with the new one. Redirect chains usually start here. |
| 302 | Found | Temporary move, method may change POST→GET. Search engines keep the original URL in the index. |
| 303 | See Other | Fetch the result with GET — the classic after-POST-redirect pattern. |
| 304 | Not Modified | The cached copy is still valid. This is your cache headers doing their job, not an error. |
| 307 | Temporary Redirect | Like 302, but the request method is guaranteed not to change. Same promise as 308, temporary. |
| 308 | Permanent Redirect | Like 301, but the request method is preserved. Use it for permanent moves of non-GET URLs. |
| 400 | Bad Request | The request itself is malformed — broken URL, bad encoding. |
| 401 | Unauthorized | Authentication is missing or failed. Sending credentials can fix it. |
| 403 | Forbidden | The server understood but refuses — access rights, or a WAF/firewall blocking you. Re-authenticating won’t help. |
| 404 | Not Found | No page here. Left alone, dead URLs drain crawl budget and leak link equity. |
| 410 | Gone | “Removed, and I mean it.” Search engines treat it as a stronger removal signal than 404. |
| 429 | Too Many Requests | Rate limit hit. Honor Retry-After and back off — hammering makes it worse. |
| 500 | Internal Server Error | The server broke mid-request. Logs, not retries, are the fix. |
| 502 | Bad Gateway | An upstream behind the proxy died or answered garbage — app crashed, PHP-FPM down. |
| 503 | Service Unavailable | Deliberately overloaded or under maintenance. With Retry-After, this is the correct code during maintenance: search engines come back later instead of dropping the page. |
| 504 | Gateway Timeout | The upstream took too long — slow backend, not necessarily a broken one. |
The pairs people keep confusing
- 301 vs 302/307: permanent vs temporary — not “strong vs weak”. Point every redirect you intend to keep at 301 (or 308 for non-GET). A 302 left in place for years still works, but it tells search engines the original URL is the real one — exactly what you don’t want after a migration.
- 401 vs 403: 401 = “who are you?”, 403 = “I know who you are, no”. If a browser keeps asking for a password, it’s 401; if it shows a bare error page, it’s 403.
- 404 vs 410: both mean the content is gone; 410 says “removed on purpose”. If you deleted a section knowingly, return 410 — it’s the honest and faster-processed signal.
- 502 vs 504: both are the proxy complaining about upstream. 502 = it answered nonsense, 504 = it didn’t answer in time. Either way the problem is behind the proxy, not in the proxy config.
- 404 vs soft 404: the status line says 200, the page says “nothing here”. Search engines detect soft 404s, but they muddy your reports — if a missing page must be missing, return a real 404.
Verify what a server actually returns
Status codes are easy to lie about: a redirect you configured in a panel may end in a 404 three hops later. Check the raw answer:
curl -sI https://example.com/some-page
For the full journey through a redirect chain:
curl -s -o /dev/null -w "%{http_code} %{num_redirects} %{url_effective}\n" -L https://example.com/some-page
That prints the final status, hop count and final URL. For one page that’s enough. For a whole list — post-migration URLs, a sitemap export, a backlink list — open each by hand and you’ll stop after five. A bulk HTTP status checker takes up to 100 URLs at once and reports the final code, the full redirect chain, the number of hops, the final URL and the response time, with CSV export for reports. For a single URL, the instant HTTP status check shows the same without a terminal.
What to do about the common bad ones
- A flood of 404s after a migration: export the URL list and run it through a bulk status check; then map the important ones with 301s. If the 404s cluster on one domain that used to be yours, check whether it simply expired — a domain expiry checker answers that in one row.
- 403 on your own pages: usually a WAF, hotlink protection or a hosting-level block — the page is fine, the door is closed. Compare from a different network before touching the app.
- 503/504 spikes: look at what the upstream is doing (slow queries, exhausted workers) and return
Retry-Afterwhile you fix it — that’s the graceful-degradation path search engines understand. - Redirect chains 3+ hops long: each hop costs a round trip. Rewrite the chain to a single hop pointing at the final URL.
Check your whole URL list at once: run the bulk HTTP status checker — final codes, redirect chains, hop counts and response times in one CSV-ready report.