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?

link|improve this question

feedback

2 Answers

up vote 10 down vote accepted

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

link|improve this answer
Thank you -- any chance you have references? – Aaron Gibralter Jun 2 '11 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... – Mark Henderson Jun 2 '11 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 Jun 2 '11 at 3:36
Note that this can't be done effectively on IIS 7.5: stackoverflow.com/questions/4968018/… – Jordan Reiter Jul 8 '11 at 0:47
feedback

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.

link|improve this answer
Ahh yeah, I realized that after I posted. I guess Google doesn't have a file called 404.html... lol. – Aaron Gibralter Jun 2 '11 at 3:41
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.