A tranquil library filled with books on wooden shelves, offering a warm, inviting atmosphere.

HTTP Status Code Reference

Complete Status Code Library

Our reference includes all 40+ HTTP status codes from 100 Continue to 511 Network Authentication Required, including rare codes like 418 I’m a teapot and 451 Unavailable For Legal Reasons. Each code includes:

Detailed Information

  • Status number and text (e.g., “404 Not Found”)
  • Category classification with color coding
  • Plain-English description and meaning
  • Common causes and scenarios
  • Resolution and troubleshooting steps

Technical Details

  • RFC specification references with links
  • Sample HTTP response headers
  • Related status codes and alternatives
  • REST API best practices
  • Framework-specific implementation notes

Custom & Extended Codes

  • Non-standard proprietary status codes
  • CDN-specific codes (Cloudflare, AWS CloudFront)
  • WebSocket close codes
  • Framework-specific extensions
  • Historical and deprecated codes

Common Use Cases

🔍 API Development & Debugging

Quick reference for implementing correct status codes in REST APIs, debugging API responses, understanding third-party API errors, and documenting API behavior

🎓 Learning & Education

Comprehensive resource for computer science students, coding bootcamp students, certification exam preparation (AWS, Azure, GCP), and web development courses

🛠️ DevOps & Support

Troubleshoot server errors and gateway issues, monitor application health, explain errors to non-technical users, document incident responses

📝 Technical Writing

Reference for API documentation, error message design, user guides and troubleshooting docs, knowledge base articles about common errors

Frequently Asked Questions

What’s the difference between 401 Unauthorized and 403 Forbidden?

401 Unauthorized means authentication is required or failed. The client needs to provide valid credentials (“Who are you?”). 403 Forbidden means the server understood the request and knows who you are, but refuses to authorize it – even with valid credentials, access is denied (“I know who you are, but you can’t do that”).

Should I use 301 or 302 for redirects?

301 Moved Permanently tells clients and search engines the resource has permanently moved. Browsers will cache this redirect. Use for permanent URL changes and SEO. 302 Found (or 307 Temporary Redirect) is for temporary redirects. The original URL should still be used in the future. Use for A/B testing, maintenance pages, or temporary moves.

What does 502 Bad Gateway mean and how do I fix it?

502 Bad Gateway means the server acting as a gateway or proxy received an invalid response from an upstream server. Common causes: upstream server is down, network issues between servers, misconfigured proxy/load balancer, upstream server timeout, or upstream returning invalid HTTP response. To fix: check upstream server health, verify network connectivity, review proxy/load balancer config, check upstream server logs.

When should I use 204 No Content?

Use 204 No Content when the request succeeded but there’s no content to return. Common scenarios: DELETE requests (resource deleted successfully), PUT/PATCH updates that don’t return the updated resource, POST actions that don’t create resources (like “mark as read” or “like”), or any action where success is confirmed but no data needs to be sent back.

What’s the difference between 400 Bad Request and 422 Unprocessable Entity?

400 Bad Request means the request is malformed or syntactically incorrect at the HTTP level (invalid JSON, missing required headers, malformed URL). 422 Unprocessable Entity means the request was well-formed but semantically incorrect (validation errors, business logic failures, like “email already exists” or “invalid date range”).

What is 418 I’m a teapot and is it real?

418 I’m a teapot is a real HTTP status code from RFC 2324 (Hyper Text Coffee Pot Control Protocol), an April Fools’ joke from 1998. It was meant as a joke about controlling coffee pots over HTTP. Despite being humorous, it’s officially recognized and sometimes used by developers for Easter eggs or to indicate that the server refuses to brew coffee because it’s a teapot.