5

On a 404 or 403 page, should we include the error code or can the page be written and designed better for UX without it?

4 Answers 4

6

While I don't think you need to explicitly display the exact error code, it won't harm to have it. Even those pages using creative "page not found" messages tend to use the error code, especially when this error is 404, because anyone surfing the web for some time has found this error many times, so a lot of people know what a 404 error code is (even if they don't know it's a response code).

On a technical side, it's good to display the error code, because it provides a hint on what to do after getting this error. Obviously, if you 're using just plain Unix messages, this is extremely needed. See the list of HTTP response codes. It's really easy to see not all messages are the same. Even if the outcome may look similar (such as a page not found), some errors offer alternatives, while other errors are definitive.

With the above being said, I think you'll realize something basic: more important than displaying error codes is to explain users what are their options.

Finally, here’s some additional info on error messages:

http://www.sitepoint.com/error-message-ux/

http://www.uxmatters.com/mt/archives/2010/08/avoid-being-embarrassed-by-your-error-messages.php

http://blog.hubspot.com/blog/tabid/6307/bid/33766/10-Clever-Website-Error-Messages-From-Creative-Companies.aspx

1
  • I'm feeling the same way - I think it's good to have but it doesn't need to be the title of the page, or the largest wording. Thanks for your thorough response :) Sep 23, 2015 at 3:10
3

I always approached this problem similarly to a search that returns no results.

Imagine that you are in a clothing store:

You: "Do you have this sweater in teal?"

Bad salesperson: "No, we don't. Sorry."

Good salesperson: "I'm sorry, we don't have it in teal, but we do have it in Aqua, or this gorgeous blue that I think would really look great with your eyes."

Similarly, if a search returns no results or a page is missing, try to offer them the next best thing to show that you're interested in satisfying them.

Note that the "Good salesperson" doesn't just say "We have it in Aqua, etc." because that would be rude: It ignores the fact that the store doesn't have it in teal. Similarly, a good UI would acknowledge the 404 (or other error), going as far as to show the error number, especially if the page invites feedback from the user. It lets them be specific: "I got a 404 error on your page just now …."

[Edited to add last paragraph on recommendation of commenter.]

3
  • This doesn't really answer the question, since you can show 404 as well as offering alternate pages (or just show 404). The question is whether the code should be included or not.
    – J. Dimeo
    Sep 22, 2015 at 1:21
  • ... but your suggestion is a good one nonetheless!
    – J. Dimeo
    Sep 22, 2015 at 1:27
  • Thanks. Added a paragraph that directly answers the question.
    – Dave Land
    Sep 24, 2015 at 17:52
1

In an anecdotal survey of the 404 pages here: http://www.creativebloq.com/web-design/best-404-pages-812505 it seems to me that you certainly don't need to incorporate the code into the page to have an effective/usable/fun 404 page, but many do anyway.

I would think showing the code would have more of an appeal to a power user or technical user (like us!) but I would recommend not having it be as prominent if you expect the general public to stumble across it.

1
  • Technical users can probably tell what the code is by looking at the network tab or delving deeper in to the markup, but I agree it's probably good to at least mention it somewhere on the page for convenience. Sep 23, 2015 at 3:11
0

I think it really depends on the error. Errors like 404 defiantly, because 404 is understood nearly universally. It might be better for errors like 401 Unauthorized and 403 Forbidden should be translated into more user friendly messages. For me personally, when I see a big 403 Forbidden I get suspicious and wan to hack around. Thus far, all I have mentioned a 4xx codes which are client errors. 5xx error codes (since they can be very vague) should be translated into a user friendly message. Since these are server errors, the user shouldn't know about them. At my high school, I went to check my grades once, and the server had an internal error (500) and dumped a bunch of JSP on the screen. Not only was it a potential security concern, but it was generally ugly to look at. So I would say to not worry about the status code in server errors, just give a friendly message like "Hey, currently are servers are experiencing some issues, but we will be back up soon."

p.s. HTTP 418 should always be displayed with the code and default message. ;)

2
  • ...unless you actually ask for tea ;)
    – Devin
    Sep 24, 2015 at 21:27
  • not sure about "nearly universally" haha, i'd love to do a street poll and ask what people thought it meant. i think you'd find a lot of people don't actually know! Oct 6, 2015 at 3:21

Your Answer

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

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