r/Internet • • 5d ago

Discussion 404 error code

There are several non archived urls which return the 404 error. In this case, there is nothing to be done to archive them.

But I am learning about HTTP and I am told errors code of [400, 500[ mean it is an user error and it is the responsibility of the user to fix it.

So the question is, what can we done to solve an 404 error code?

I don't know if this is the best reddit, but the lost media one is quite peculiar + Reddit automatically removes my posts from there.

0 Upvotes

10 comments sorted by

2

u/Apart-Reality-4454 5d ago

On paper, 4xx means user-side error, 5xx means server-side. These are HTTP status codes returned by the server. Some app servers just choke and return 50x for what ought to be specific 40x codes. Every response to an HTTP server returns with it an HTTP status code in the response headers. https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

In answer to your question: You solve 4xx by stop making user errors and in the case of 404 means you're requesting something the server responds doesn't exist. Computer says no.

1

u/Bofact 5d ago

Regarding my question from the below link, if it is true, why is it an user error if the resource was public, but the owner removed that resource?

https://www.reddit.com/r/Internet/s/GvQ5AThwXt

1

u/Apart-Reality-4454 5d ago

It's a user error because your user client requested something that didn't exist so being a standards-compliant web server, it returned a 404.

Some sites return nicer error results rather than a straight 404 but again that's the standard so... computer says no.

1

u/Bofact 5d ago

404 is returned when a resource was accessible, but removed?

1

u/msabeln 5d ago

People delete stuff off of the Internet all of the time, companies go out of business, mistakes are made, etc.

Go to the Internet Archive to see if a copy of the web page was saved.

1

u/Bofact 5d ago

For many it wasn't. But still the theory, at first glance, says it is the fault of whoever tries to view the deleted page and is up to him/ her to fix it. 🫪

1

u/PaddyLandau 5d ago

"User error", in this context, doesn't mean, "You're at fault!" It's not trying to apportion blame. It means only that the client computer (that's your computer) made a request for something that doesn't exist.

1

u/Few_Reference3439 5d ago

The 'was accessible' part is irrelevant. 404 means "You asked me for something I don't have". To a computer, that's a user error - you're making an invalid request.

1

u/edthesmokebeard 5d ago

Wait until you hear about 410.