HTTP Status Codes
What every HTTP response code means, when to return it, and exactly how search engines interpret it — including the 301/302 and 404/410 decisions that come up in every migration.
The five classes
The first digit tells you the category, and that alone answers most questions:
| Class | Meaning | Who should act |
|---|---|---|
| 1xx | Informational | Nobody — the request continues |
| 2xx | Success | Nobody |
| 3xx | Redirection | The client should follow |
| 4xx | Client error | The requester must change something |
| 5xx | Server error | The server operator must fix it |
| Code | Name | Meaning | SEO note |
|---|---|---|---|
| 100 | Continue | Client may proceed with the request body. | |
| 101 | Switching Protocols | Upgrading, typically to WebSocket. | |
| 103 | Early Hints | Preload hints sent before the final response. | Performance win |
| 200 | OK | Standard success. | Indexable |
| 201 | Created | A new resource was created; Location header points to it. | |
| 204 | No Content | Success with nothing to return. | |
| 206 | Partial Content | Range request satisfied; used for video seeking. | |
| 301 | Moved Permanently | Resource has a new permanent URL. | Passes ranking signals; preferred for migrations |
| 302 | Found | Temporary redirect; original URL stays canonical. | Original URL stays indexed |
| 303 | See Other | Redirect after POST; forces a GET. | |
| 304 | Not Modified | Cached copy is still valid. | Saves bandwidth and crawl budget |
| 307 | Temporary Redirect | Like 302 but the method is preserved. | |
| 308 | Permanent Redirect | Like 301 but the method is preserved. | Same SEO effect as 301 |
| 400 | Bad Request | Malformed syntax the server refuses to process. | |
| 401 | Unauthorized | Authentication required or failed. | Not indexed |
| 403 | Forbidden | Authenticated but not permitted. | Repeated 403s can lead to deindexing |
| 404 | Not Found | No resource at this URL. | Dropped from the index after repeated crawls |
| 405 | Method Not Allowed | The verb is not supported for this resource. | |
| 410 | Gone | Deliberately removed and not coming back. | Deindexed faster than 404 |
| 418 | I'm a teapot | April Fools' joke from RFC 2324, never implemented seriously. | |
| 422 | Unprocessable Content | Syntactically valid but semantically wrong. | |
| 429 | Too Many Requests | Rate limit exceeded. | Crawlers back off; sustained 429s reduce crawl rate |
| 451 | Unavailable For Legal Reasons | Blocked by legal demand. | |
| 500 | Internal Server Error | Unhandled server-side failure. | Crawl rate is reduced; prolonged errors cause deindexing |
| 502 | Bad Gateway | Upstream server returned an invalid response. | |
| 503 | Service Unavailable | Temporary outage or maintenance. | The correct code for planned downtime; add Retry-After |
| 504 | Gateway Timeout | Upstream server did not respond in time. |
What each code means for search
200 — the only code that gets indexed
Everything else is a signal about what to do with the URL, not content to rank.
301 versus 302
Both pass ranking signals. The difference is what happens to the old URL: a 301 tells Google to replace it with the target, a 302 tells Google to keep the original indexed. Using 302 for a permanent move leaves the old URL in the index indefinitely. Build the rules with the redirect generator.
404 versus 410
404 means “not found, possibly temporarily”; 410 means “gone deliberately”. Google treats 410 as a stronger signal and removes the URL slightly faster, but both end in deindexing. Neither harms the rest of the site — 404s are a normal part of the web.
Soft 404s are the real problem
A soft 404 is a page that says “not found” while returning 200, or one that redirects every missing URL to the homepage. Google detects and flags these, and they waste crawl budget. Return the correct status code.
503 for maintenance
During planned downtime, return 503 with a Retry-After header. Google will come back rather than interpreting the outage as removal. A maintenance page served as 200 tells Google every page on your site now contains the same “back soon” text.
Diagnosing status codes
# Headers only
curl -I https://example.com/page
# Follow the whole redirect chain
curl -sIL https://example.com/old | grep -E '^(HTTP|location)'
# See the codes without the noise
curl -o /dev/null -s -w '%{http_code} %{url_effective}\n' -L https://example.comIn the browser, the Network panel shows the status of every request; enable “Preserve log” before testing redirects or the chain disappears on navigation. In Google Search Console, the URL Inspection tool reports the status Googlebot last saw, which can differ from what your browser sees if the server treats crawlers differently.
Serving different status codes to Googlebot than to users is cloaking and is a policy violation. If your CDN or WAF blocks crawler user agents with 403 or 429, pages will silently drop out of the index.
Related headers worth knowing
| Header | Used with | Purpose |
|---|---|---|
Location | 3xx, 201 | Where the client should go next |
Retry-After | 429, 503 | Seconds, or a date, before retrying |
Cache-Control | Any | How long the response may be cached |
ETag | 200, 304 | Version identifier for conditional requests |
X-Robots-Tag | Any | Indexing directives for non-HTML resources |
Link: rel=canonical | Any | Canonical URL for PDFs and other non-HTML files |
Content-Type | Any | The MIME type and charset of the body |
Frequently Asked Questions
What does a 404 error mean?
The server understood the request but has no resource at that URL. It is a normal part of the web and does not damage the rest of your site; the URL is simply dropped from the index over time.
What is the difference between 301 and 302?
301 is permanent and tells search engines to replace the old URL with the new one. 302 is temporary and keeps the original URL indexed. Use 301 for anything that will not move back.
Do 404 errors hurt SEO?
Not directly. They only matter when pages that should exist return 404, or when large numbers of them waste crawl budget. Fix the ones with inbound links or traffic; ignore the rest.
What status code should I use for maintenance?
503 Service Unavailable with a Retry-After header. It tells crawlers to come back rather than treating the outage as content removal.
What is a soft 404?
A page that displays a not-found message while returning 200, or a mass redirect of missing pages to the homepage. Google detects these and treats them as errors.
When should I use 410 instead of 404?
When you deliberately removed content and it will not return. Google processes 410 slightly faster, though both lead to deindexing.
What does 429 mean?
Too Many Requests — a rate limit was exceeded. If crawlers hit it repeatedly, Google reduces its crawl rate for your site.
Sources & further reading
- RFC 9110 §15 — the normative definitions of every status code
- Google: HTTP status codes and Search — how Googlebot interprets each class
- MDN: HTTP status codes — practical reference with browser behaviour notes
- IANA: HTTP status code registry — the complete official list