error 502

Why do we still have these HTTP error codes?

For me it seems like they are completely useless for the user (not for all but most of them). It says nothing helpful (look at the screenshot above, it even doesn't says it's "an error") and explains nothing so I believe users are confused. And AFAIK it's a common way of representing HTTP error codes.

I believe browsers (for example) could handle these things somehow so original message will still be available for technical purposes but users will got more value.

So why they are still here? Is it possible to handle these codes more gently?

Update: why these errors could not be handled by the browsers? Or maybe there are any limitations? Incompatible design doesn't seems to be a problem for me, and I'm sure that standard views will improve UX because of similarity (errors will look similar for every site). And now I have to parse every cool designed error page to understand that happened.

  • 4
    Because it's the default on the server platform, not for any intentional design reason. Browsers automatically handling them is no good, many sites DO serve up proper pages for errors
    – Ben Brocka
    Jan 19, 2013 at 23:44
  • 3
    These error codes have a very specific use and significance. Displaying them raw to the user is an UX fail, but does not make them obsolete. Jan 20, 2013 at 9:56
  • @MarjanVenema I understand the purpose and significance of these errors, I just can't understand why these errors aren't handled by browsers or something. Are there any limitations (except some design-like) and I miss something or just nobody really cares? Jan 20, 2013 at 10:06
  • 3
    Modern browsers do give you a friendly interpretation of the codes (there is an IE example in an answer below). In your example, the web server has been configured to serve that specific page (a default, I am guessing) and the browser is choosing not to clobber it.
    – Burhan Ali
    Jan 20, 2013 at 18:35
  • 2
    IMHO, error codes are better than messages because they are more specific. Most server failures can be summed up to "This page could not be displayed," but error codes actually tell you why. If one does not understand an error code, they can do a web search for it. The same applies to other applications, such as games.
    – KOVIKO
    Jan 23, 2013 at 14:51

5 Answers 5


HTTP error codes are primarily useful for support and debugging. In the early days of the internet, almost all users were technical, and so having them made a lot of sense.

Today, it still makes sense having them visible, but that should not be the only information that you provide. Explain it like a human for the rest of the world to understand what happened and where possible try give them a useful alternative.

Some examples:

enter image description here

enter image description here

enter image description here

  • 5
    love the examples Jan 20, 2013 at 3:14
  • +1 If this answer wasn't here already - I'd given it myself. Great Answer John! Jan 20, 2013 at 10:37
  • John, your examples are great, but my original intention was not to find out how to design error page but rather about how to find possible ways of solving that problem in common. The problem I see it is that you have to do it yourself (design, etc) but could we change a technology behind it and make things more simple and clear? (just got another error) Jan 21, 2013 at 19:11
  • @alexeypegov The examples are to show non technical text rather than design. The problem with asking for a technical standard alternative to technical response codes is that they will likely also be technical. You have to design your own pages so that they explain what you want to tell someone in each situation.
    – JohnGB
    Jan 21, 2013 at 19:19
  • 1
    @alexeypegov, As JohnGB has already explained; these technical codes are extremely useful to those who need to take technical action when they occur - changing their behaviour at that point would almost certainly result in bad UX for technical staff. However, it is possible to add your own pages that explain the situation for regular users who may simply need to hit refresh. You need to construct your own rather than relying on the browser because the idea of 'less technical language' will differ from site to site with different user demographics preferring different language. Jul 12, 2016 at 13:48

It depends on who "the user" is.

HTTP error codes are definitely cryptic and unhelpful to users using a browser. Different web servers will each have their way of displaying these pages, with varying levels of user-friendliness out of the box. In most cases web developers can override these, but many times this will only be done for the most common errors. Meanwhile, some browsers (like IE) will show their own "friendly" error pages. For example IE9 has pages like this (which aren't all that friendly if you ask me):

enter image description here

Meanwhile, HTTP error codes are very friendly for developers who are programmatically accessing the page. For example a "301 Moved Permanently" means that the program should stop making requests to that URI (and use the new URI provided in the response).

This is really the intended use. So that is the reason they are still here. But yes, they can be handled more gently.

  • 2
    Developers should be ignoring the page content and paying attention to the headers. Having an html page with an error code is not particularly helpful to developers; it is way too much effort to parse such a page compared to the effort to read the headers.
    – Brian
    Jan 21, 2013 at 14:17
  • Does IE shows an HTTP errors that way? AFAIR, it's shown only for "no internet connection" case. Am I wrong? And the second thing I would like to mention, the users aren't developers (most of us) and I'm absolutely sure there is a possibility to report an error such a way that it will be comfortable for both users and developers. Jan 21, 2013 at 19:23
  • :) I believe it does for various HTTP errors. I was unable to quickly come up with one so I just tried connecting to something that doesn't exist. So I cheated, but the styling is the same.
    – jlarson
    Jan 21, 2013 at 19:55

It's true that error codes are not user friendly at all, but it's up to web designers must do a complete job and provide appropriate pages for error conditions.

Twitters 502 error page: Twitters 502 error page

  • But why designers are responsible for that? I think that modern web browsers are able to render something more clear to the user instead of this system error messages. Jan 19, 2013 at 20:25
  • 3
    @alexeypegov - so the error page can be tailored to fit the site. A more technically oriented site can provide technical info about the error, while a site that has many nontechnical users might opt for something simple and unintimidating.
    – obelia
    Jan 19, 2013 at 21:13
  • @alexeypegov partly because the website should have specific details about what the user should do based on the error. This will vary from site to site.
    – jlarson
    May 23, 2014 at 15:01

Why do we still have these HTTP error codes?

Mostly for historical reasons.

As @JonGB said, In the early days of the internet, almost all users were technical, and so having them made a lot of sense.

Nowadays it's not strictly mandatory anymore. From a technical standpoint, the codes have necessarily to be present on the headers of the files sent from the server to the browser (see the last item in the bullet list), but these codes don't have to be displayed to the user: actually it's even discouraged.

Quoting a guide on 404 pages from Google Webmaster Tools:

While the standard 404 page can vary depending on your ISP, it usually doesn't provide the user with any useful information, and most users may just surf away from your site. (...) A good custom 404 page will help people find the information they're looking for, as well as providing other helpful content and encouraging them to explore your site further. (...) Because a 404 page can also be a standard HTML page, you can customize it any way you want."

  • Tell visitors clearly that the page they're looking for can't be found. Use language that is friendly and inviting.
  • Make sure your 404 page uses the same look and feel (including navigation) as the rest of your site.
  • (...)
  • In order to prevent 404 pages from being indexed by Google and other search engines, make sure that your webserver returns an actual 404 HTTP status code when a missing page is requested.

Note: a special case is the 404 code, that was so common in the not-so-distant past that it helped coining its own slang. So a portion of the users are expecting to see a 404 somewhere in the page -- the term not being present can, ironically, be considered counterintuitive.

Note as in @JonGB's answer, two of the three user-friendly examples do display the 404 code in the content.

This doesn't happen with other error codes.

  • 1
    I feel this answer doesn't acknowledge the importance of a graceful 500 or 403 - or any other thrown code : there is significance in the issue and honesty is "an important policy" - a well handled and acknowledged system error is at least marginally comforting to the user insofar as their experience is not a silo of isolation but rather it's known and being corrected, actively. .,/2cents Jan 20, 2013 at 3:13
  • 1
    The error codes are not there for historical reasons! They serve a very real purpose for browser developers as well as anybody retrieving pages programmatically. Showing them raw to a user is an UX fail, but does not in any way detract from their usefulness. Jan 20, 2013 at 9:58
  • @MarjanVenema The error codes are always present on the HTTP headers. Programmers, system administrators and web developers can check the headers for the error codes. Common visitors need more user-friendly messages on the page's content Jan 20, 2013 at 14:31
  • @ruda.almeida: and where did I dispute that? Jan 20, 2013 at 18:07

I think one reason the browser doesn't intervene at that stage with a standardised message is because it would never look the same as the site you are currently viewing - it wouldn't be seemless and therefore could actually be detrimental to the user experience. To the user, it could look like you have been redirected to a completely different website, with different layouts, themes, colour schemes, fonts, etc.

Also, if browsers did handle these errors, but as a web developer you have to provide a customised page, how would your site override the browser? For example, providing your own custom 404 page means you can also add some links specific to your site (Eg: "this page was not found, click here to visit our support page to see if they can help you."). Being totally generic isn't always helpful to the user, it should be explicit about what went wrong, and provide constructive advice on what to do next/fix the problem (see above examples by JohnGB that contain the site specific links, and also the Nielson Norman group article on error message guidelines)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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