📡 HTTP Status Codes

Complete reference for all HTTP status codes (1xx-5xx). Descriptions, common use cases, and troubleshooting tips.

Advertisement

📖 Understanding HTTP Status Codes

HTTP status codes are three-digit numbers returned by web servers to indicate the outcome of an HTTP request. They are grouped into five categories: 1xx (Informational), 2xx (Success), 3xx (Redirection), 4xx (Client Error), and 5xx (Server Error).

As a web developer, you'll most commonly encounter 200 (OK), 301/302 (redirects), 404 (Not Found), 403 (Forbidden), and 500 (Internal Server Error). Understanding these codes is crucial for debugging API integrations, monitoring server health, and implementing proper error handling.

❓ Frequently Asked Questions

301 is a permanent redirect — it tells browsers and search engines that the resource has permanently moved. Use for domain changes, URL restructuring. 302 is a temporary redirect — the original URL may still be valid later. Use for maintenance pages, A/B testing, or temporary moves. For SEO, 301 passes link equity (PageRank) to the new URL; 302 does not.

Implement exponential backoff: wait 1s, then 2s, then 4s between retries. Check the Retry-After header for server-recommended delay. Consider caching responses, reducing request frequency, or implementing request queuing on the client side.

🔗 Related Tools