4xx Request Errors

400 Bad Request

This code indicates that the server could not understand the client’s request or found it to be incorrect in some way.

401 Unauthorized

This code is used when access to a resource is protected and the client did not provide valid authentication credentials. Often, the 401 response includes information that causes the user agent to prompt the user for a username and password.

402 Payment Required

This code is reserved but not yet described in the HTTP/1.1 specifications.

403 Forbidden

This code indicates that the resource cannot be accessed, regardless of any authentication credentials. For example, this happens if a directory or file is unreadable due to file permissions.

404 Not Found

This code indicates that the requested resource does not exist on the server. It may also be used in place of 403 if the server doesn’t want to acknowledge that the resource exists but cannot be accessed.

405 Method Not Allowed

This code indicates that the request method is inappropriate for the given URI. The response should include a list of methods that are allowed.

406 Not Acceptable

This code is used when the client’s requirements, as given in the Accept header, conflict with the server’s capabilities. For example, the client may indicate it will accept a GIF image, but the server is only able to generate JPEG images.

407 Proxy Authentication Required

This code is similar to 401 but is only returned by proxies. A proxy returns a 407 message upon receipt of a ...

Get Web Caching now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.