I noticed that, say, goolge's 404 page returns a 404 status (http://www.google.com/404.html) while github's returns 200 (https://github.com/404.html). Should error pages (even 503s, etc.) always be served with the correct status codes? Or should front end servers intercept them and display 200ed error pages?

2 Answers 2


Error pages should always be served with the correct status codes.

  • Thank you -- any chance you have references? Commented Jun 2, 2011 at 1:32
  • 3
    @Aaron - besides common sense? I don't know why on earth github would return a 200 OK on a 404 page... Commented Jun 2, 2011 at 2:05
  • @Mark Henderson Access any other invalid URL on GitHub and it'll return a 404. 404.html is a real HTML page that's presumably included when a 404 is encountered.
    – ceejayoz
    Commented Jun 2, 2011 at 3:36
  • Note that this can't be done effectively on IIS 7.5: stackoverflow.com/questions/4968018/… Commented Jul 8, 2011 at 0:47

GitHub's 404.html page is returning 200 because you're directly accessing their 404 template.

https://github.com/lollerskates returns a 404 status code, as it should be.

  • Ahh yeah, I realized that after I posted. I guess Google doesn't have a file called 404.html... lol. Commented Jun 2, 2011 at 3:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .