HTTP status codes are three-digit responses that describe the outcome of a request. They are grouped into five classes:
| Class | Range | Meaning |
|---|---|---|
| 1xx | 100-199 | Informational - request received |
| 2xx | 200-299 | Success - request handled |
| 3xx | 300-399 | Redirection - further action needed |
| 4xx | 400-499 | Client error - problem with request |
| 5xx | 500-599 | Server error - problem on the server |
Quick Reference: Common Codes
2xx - Success
3xx - Redirection
4xx - Client Error
5xx - Server Error
How Status Codes Affect CDNs
- Cacheability: HTTP defines 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, and 501 as heuristically cacheable. Explicit cache controls can permit or prohibit storage and reuse. A 304 response updates or validates a stored response without transferring its content.
- Failover: Some CDN configurations treat selected network errors or 5xx responses as retry or failover signals. Verify provider policy, method safety, and idempotency to prevent retry amplification.
- 206 Partial Content: Essential for media delivery; CDNs must handle
Content-Rangecorrectly.
Best Practices & Further Reading
For server, API, or CDN configuration work, these focused guides provide more detail:
Choosing the Right HTTP Status Code - Covers when to use 200 vs 201 vs 202; 204 vs 304; mapping validation/auth/quota issues to 400/401/403/429; idempotency, retries, and how status codes interact with
Cache-Controland conditional requests.Redirects Deep Dive: 301 vs 302 vs 307 vs 308 - Explains method preservation (POST vs GET), SEO and caching semantics, CDN TTLs for redirects, migration playbooks, and pitfalls when changing temporary to permanent.