4xx Client Error Status Codes
Showing 29 status codes
HTTP 4xx status codes indicate client errors where the request contains bad syntax, cannot be fulfilled, or the client doesn't have permission to access the requested resource. These errors are the client's responsibility to fix.
The most recognized 4xx code is 404 Not Found, indicating the requested resource doesn't exist. Other critical codes include 400 Bad Request (malformed syntax), 401 Unauthorized (authentication required), 403 Forbidden (authenticated but not authorized), and 429 Too Many Requests (rate limiting).
Understanding the differences between 4xx codes helps developers build better error handling and provide meaningful feedback to users. For example, knowing when to return 401 vs 403 helps users understand whether they need to log in or if they simply don't have permission.
4xx Client Error Status Codes FAQ
What is the difference between 401 and 403 status codes?
401 Unauthorized means authentication is required and has failed or not been provided. 403 Forbidden means the server understood the request but refuses to authorize it, even with valid credentials. Use 401 when login is needed, 403 when the user lacks permission.
What does 404 Not Found mean?
404 Not Found indicates that the server cannot find the requested resource. This could mean the URL is wrong, the resource was deleted, or it never existed. It's one of the most common HTTP errors users encounter.
When should I use 400 Bad Request?
Use 400 Bad Request when the server cannot process the request due to client error, such as malformed request syntax, invalid request parameters, or deceptive request routing. It's a general-purpose error for client-side issues in the request.