First, I believe it is interesting to define what an error message is and what it is for.
According to the trusted Portuguese language dictionaries, Priberam, Michaelis and Aulete an error, in summary, would be:
That which is the result of a misunderstanding or a deficient analysis of a fact or a subject. Deception, inaccuracy or inaccuracy.
Imprecise conceptualization of an idea or misinterpretation of a subject, of a theme; inaccuracy.
Lack of correction, accuracy, perfection, etc.; Failure; Defect; Imperfection.
On purpose of an error message, the following definition fits well:
The purpose of an error message is to help the user who encountered the error, to learn how to avoid the behavior that caused the problem. The program has found a situation that it cannot handle and needs to tell the user, so that the user (or someone else) understands and can avoid the situation that the program cannot handle. [...] Generic error message that says: "an unexpected error occurred" is totally useless in this objective. Gives the user no hint as to what can be changed to avoid the problem, or even fix this issue.
Understanding this definition, it is possible to establish three important points for a good error message:
- Let us know what the problem is.
- Make you feel like there’s something you can do about it.
- Speak as a human and be a consistent extension of the personality of the rest of the application.
Redirect to another page?
Should it redirect to another page? After how long?
In general, it is not recommended to redirect the user to another page, especially if it is to a page outside your domain. The main reason is that you never know for sure where the user really wants to go.
If the user is trying to access an old URL that has been moved, it is good to redirect them to the old URL and report that there has been a change of address, and then give the option to follow the link to the new page. But you really should be using a 3xx redirect instead of a 404.
HTTP error codes should never be exchanged and/or misused. Imagine if you are servicing a page that is returning error 500 (Internal Server Error), while actually the actual error is 403 (Access Denied). Unless you’re a psychic, and I apologize if you are, how are you gonna find out where the mistake came from and how are you gonna fix it?
Leave a search box?
Should there be an index? A box and search free? Or already do the search suggesting pages based on what was typed?
It depends on what type of application and the target audience is being treated. In more common cases, it is interesting to leave a search box free. Especially if you already have a fixed navigation bar with a search box (as in the case of Stack Overflow) which will show more links suggesting other sites, it is unnecessary to do both.
In such cases, adopting a page showing related topics is advantageous. It may not be the friendliest alternative in UX issues (some agree, others disagree), but as in the case of Stack Overflow that keeps the navigation bar constantly on all pages, the page suggestions option is something to consider.
Explicitly show the error?
Should it demonstrate that it is a mistake? Should it show the 404? Or is it better to look cleaner and look normal and just need to do something else?
It is useful to show the number 404 for the following reasons:
- He is a shorthand error. 404 already synthesizes an error message;
- The vast majority of people know what 404 means, even if in a simplified way;
Demonstrating error is the best option. It is already public knowledge that running away from problems is not the best alternative (both in life, as in programming). The problem simply grows, turns into a snowball and will only generate more headaches. There are even phrases talking about it:
Don’t run away from your problems or despair. Face them with courage and determination, for if you do not resolve them today, you will surely have to do so tomorrow because they will continue to exist until they are resolved, prolonging your suffering.
Source: Thinker
Briefly, I’ve talked about this in another answer:
[...] In a synthesized way, explain the minimum to your user, but in a clear and understandable way, and if possible do something that allows the user to know that the problem is not being ignored. Let them take some action, such as submitting the logs or submitting an error report. Alternatively, let them know that the automatic action has already been taken and that your technical staff has been automatically notified that this error has occurred and is working on it.[...]
How should the design on the error page?
The page should keep the design website or have something neutral? Should it be very clean or with as much information as possible? Should you take advantage of anything else? Advertising?
The above section already covers part of the question:
[...] In a synthesized way, explain the minimum to your user, but in a clear and understandable way, and if possible do something that allows the user to know that the problem is not being ignored. Let them take some action, such as submitting the logs or submitting an error report. Alternatively, let them know that the automatic action has already been taken and that your technical staff has been automatically notified that this error has occurred and is working on it.[...]
Keep the design in the pattern of your site and the error message in a simple and understandable way. Some reasons to follow this idea are:
The error should be shown to those who are going to solve the problem. Is it the user? No! So don’t show him what he won’t solve. Show a minimal, complete and understandable error message that tells you why and if it can do anything to collaborate.
- If you change the design of the error page too much, your user may think that they clicked on some improper link, and were redirected to some third-party website.
Try to maintain cohesion between error pages with the rest of your site. Be a consistent extension of the personality of the rest of the application. And please, no publicity when error is occurring. In doing so, the user could easily think, "You have time to post ads, but you don’t solve this crap".
- Alternatively, try to understand that when the layman sees an error message, the first thing he looks for, almost always, is the close button (it’s amazing). You can give 2 lines of message, or a whole stack trace, and yet, there will be users who won’t read.
Do you want an example of this? I’m sure not half of the people in it Stack Overflow in English knows head-on what appears on the modal that appears when you click the button Answer your question (i know you looked now to see what had written). So, by these and others, you can see that there is no reason to inform various codes "strangers" and "numerous error lines".
An apology is worth making?
The error may be from the site or the user who typed something wrong, or even from who put a wrong link to it, so it may be from third parties. This is a concrete case to apologize or not?
Apologize. The user is accessing your website, your responsibility. Imagine the following situation: You go to the bakery and you have no bread, for whatever reason, since the machine broke, the energy ran out, the baker broke his leg, there was no more yeast, or there was no decent crop, and there were no ways to make flour. The owner of the bakery will say:
I’m sorry, but XYZ happened, and then blah, blah, blah...
Besides being a matter of education (it’s good and I like it, and I think you like it too), you’ll be showing that you care about the user. There is also an excerpt from the excellent answer on the appropriate apology what it says:
[...] The fact is that the excuse is an important social lubricant, whose character in the interaction also serves as a way to indicate the real intention of the interlocutor (something like "I really didn’t mean to hurt/bother you on purpose")and so is traditionally used to initiate a conversation considering a possible interruption of any introspection/activity of the recipient of the message [...]
Note that when you apologize, you are "preparing the atmosphere" of the interaction, which still makes it possible, in this case, to offer other products to your customer (just as the owner of the bakery does). If that were the case, he would say something like, "We don’t have X today, but how about a tasty Y and/or Z. We also have A and B available if you want".
Concluding
After these considerations, I believe you can also take a look at these 404 error pages, which exemplify what was said in this reply:
Note that all, implements almost everything that has been said. They have apology requests, synthesized information, search box, and the standard convention of use. Of course there is no perfect UX error page. The logic of each page varies greatly with its target audience and the philosophy of the developers. But in general they follow conventional wisdom and "good practice".
Did any of the answers resolve what was in doubt? Do you need something else to be improved? Do you think it’s possible to accept any of them now? Your feedback is very important to the community.
– UzumakiArtanis
@Stormwind will still see what to do, maybe I put reward, but on holiday is complicated.
– Maniero
No problem. If you need more information just edit the question and/or comment on the points to be improved.
– UzumakiArtanis