Correct http status code for resource which requires authorization
问题 There seems to be a lot of confusion about the correct http status code to return if the user tries to access a page which requires the user to login. So basically what status code will be send when I show the login page? I'm pretty sure we need to use a status code in the 4xx range. I'm not talking about HTTP authentication here, so that's at least 1 status code we aren't going to use ( 401 Unauthorized ). Now what should we use? The answers (also here on SO) seem to vary: According to the