404 page redirect to the same address or to issue a 404 error at the address of the request?

As most native and competently from the point of view to make the notification of the user, his browser and all the others who can go on the web server, that at this address there is no page? To do it always redirect to a common site type page domain.ru/404 that and give a response code of 404, or write user/etc to the address at which he chose to go, not redirecting it somewhere, and it is there to visually show error 404 and give it to the browser/etc?

It would be great if support your answers with pros and cons listed two or even any solutions.
June 7th 19 at 14:39
1 answer
June 7th 19 at 14:41
Elementary, let's see what the response codes mean. Let's say 301 - moved permanently. So the page existed but always postponed at the address /404 which in turn gives the 404? I think it is fundamentally wrong. The browser goes to the address /qwerty and with it should get a 404 - page does not exist.
Good point about the value of the response code, but on the other hand, in terms of programming anything surprising in it is not - it can be deciphered as the page was deleted in a basket, for example, or moved to dev/null, in General, to find here your logic is also possible.

I was rather interested in exactly how, from the point of view of standards is more true to do. - marietta.Jones commented on June 7th 19 at 14:44
,
this can be deciphered as the page has been removed in the basket
- there is not. There is a clear specification of response codes. https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html 404-page not found, 410-page removed, although the status of 410, I have never met, usually a 404 instead give. But 301, 302 and the other can't exactly be considered "removed add to cart". - Kennith62 commented on June 7th 19 at 14:47

Find more questions by tags Web DevelopmentBrowsers