Tag Info

New answers tagged

1

I think for any valid response over the HTTP protocol, the server must respond with an HTTP/x.x type header. As I understand it, the Status: response header is something a CGI script would set for the web server to then generate a correct HTTP/x.x type header (thus overriding the default response). More information in these StackOverflow questions: ...


1

Malformed request doesn't mean "a URL you don't have a resource for". It means malformed request. HTTP 400 is definitely wrong here. HTTP 410 works well as it indicates that a previously accessible resource no longer is. Your alternative, as others have mentioned, would be a 404.


14

Officially, yes. Any 4xx status may be interpreted as 400; the same goes for the other status groups. (E.g. a 503 service unavailable error may be interpreted as a 500 internal server error.) The RFC is written this way to allow for implementations that may not support every status, and also to allow additional status codes to be defined without breaking ...


0

According to Google & in the context of SEO, In case of 404, the page is retained 24 hours before being considered as deleted. In case of 410, the page is considered as deleted right away. I guess for a big online shop it can make a difference for product pages that are gone. If the product are discontinued a 410 would be normal. In fact, it is possible ...


1

A 404 or 410 is fine for any page or URL that does not exist. You do not have to mix the two- you can chose just one. If the page is gone, then a 410 is certainly appropriate, however, a 404 is automatic (as well as traditional as a result) and fine too. Just know that Google, for example, will try for a number of times before delisting any URL from the ...


27

Why 410 gone? Since the page once existed the correct header status return would be 410 gone, this will inform Google and other search engines to drop the page from its index. You should avoid using status 400 bad request since this implies the server did not understand the request due to malformed syntax. Using undesirable status codes will populate your ...


1

As @closetnoc suggests, the presence of the NULL char in a URL could be seen as the source of an attack (whether the software is vulnerable or not is another matter), so some servers do actively protect against this (however, I'm not aware of this being implemented at the core). RFC3986 - Uniform Resource Identifier (URI): Generic Syntax makes specific ...



Top 50 recent answers are included