Web Status Codes

Web Status Codes

The status codes are all three-digit numbers that are grouped by the first digit into 5 groups. The reason phrases given with the status codes below are just suggestions. Server can return any reason phrase they wish.

1xx: Informational

No 1xx status codes are defined, and they are reserved for experimental purposes only.

2xx: Successful

Means that the request was processed successfully.

  • 200 OK
  • Means that the server did whatever the client wanted it to, and all is well.

  • Others
  • The rest of the 2xx status codes are mainly meant for script processing and are not often used.

3xx: Redirection

Means that the resource is somewhere else and that the client should try again at a new address.

  • 301 Moved permanently
  • The resource the client requested is somewhere else, and the client should go there to get it. Any links or other references to this resource should be updated.

  • 302 Moved temporarily
  • This means the same as the 301 response, but links should now not be updated, since the resource may be moved again in the future.

  • 304 Not modified
  • This response can be returned if the client used the if-modified-since header field and the resource has not been modified since the given time. Simply means that the cached version should be displayed for the user.

4xx: Client error

Means that the client screwed up somehow, usually by asking for something it should not have asked for.

  • 400: Bad request
  • The request sent by the client didn’t have the correct syntax.

  • 401: Unauthorized
  • Means that the client is not allowed to access the resource. This may change if the client retries with an authorization header.

  • 403: Forbidden
  • The client is not allowed to access the resource and authorization will not help.

  • 404: Not found
  • Seen this means that the server has not heard of the resource and has no further clues as to what the client should do about it. In other words: dead link.

5xx: Server error

This means that the server screwed up or that it couldn’t do as the client requested.

  • 500: Internal server error
  • Something went wrong inside the server.

  • 501: Not implemented
  • The request method is not supported by the server.

  • 503: Service unavailable
  • This sometimes happens if the server is too heavily loaded and cannot service the request. Usually, the solution is for the client to wait a while and try again.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s