Skip to main content

What is the right status code?

There are LOTS of status codes and we won't go through them all cough 418 cough...

But let's just look at some of the common ones you would want to use:

Success

  • 200 - All OK!

Redirects

  • 301 - When it's a redirect that isn't going to change
  • 302 - When the redirect is only temporary
  • 308 - When it's a redirect that isn't going to change and you want to be more strict about the parameters

Client (User) Error

  • 403 - Forbidden (Naughty Naughty)
  • 404 - Page Not Found

Server Error

  • 500 - Service Error
  • 503 - Service Unavailable