Ashwin S.
5min Read

Guide to Common Client-Side 4xx Error Codes

common client-side 4xx http error codes

You’ve gotten your website up and running at long last. There are a few website errors that keep bugging you, but content is flowing, the number of visitors are growing, and things are finally starting to come together – it’s showing.

To keep those nibbling issues from becoming bigger headaches down the line, however, you’re going to want to address them while they’re molehills, unless you’re into hiking in which case leave them be and scale that mountain when you get there.

Good sense dictates that taking care of smaller issues as they arise just makes operations more seamless, which is something we all generally want. Some of these website errors can present a real problem for your website down the line if left unchecked, as anyone starting a garden with a mole will attest to.

To save yourself from being blind-sided by these molehill HTTP error messages we’ll guide you into fixing the common websites issues you may be experiencing without having to sniff around the internet for solutions. You won’t even need to hassle IT or tech support. Let’s dig in.

Client versus server errors

The HTTP error codes in the 4xx category are considered to be client-side errors, while errors in the 5xx category are considered server-related errors. Knowing the difference can guide you in how to address the issue from your side, if at all possible, whether you’re the client or have someone trying to access your website.

If you’re not familiar with some of the terms you can check out our website glossary blog post that explains common web hosting jargon.


Error code 400: Bad Request

A bad request tells us that there was a bit of a mix-up in the request sent by the client or web browser. Generally, the server will be unable to process the request because of a syntax error, but it can also be because the client is trying to send a file that is too large.

Some of the other possible reasons for an error code 400 could be the URL entered is invalid, the routing used by the client is being read by the server as malicious or suspicious, or your internet connection could be acting up.

Fix

As a client, you can fix this by ensuring your connection is stable. You can also clear your cache, try a different browser, or ensure the URL you entered is correct.


Error code 401: Authorization Required

As the name infers, this client error code appears when you try to access a webpage that you do not have the authority to enter, like the admin area of someone’s website. It can also pop up if you enter the wrong credentials on a login attempt.

Think of it as security at the door asking for ID and then refusing to let you inside. It could be that your ID was invalid for some reason, or you could be banned from the venue (server, in this case).

Fix

To fix this you can start by checking the URL since as a client you may be able to access some pages on the domain, but that specific URL requires some authorization.

Another reason could be that the cookies (tiny bits of data) stored are causing an issue with improper authentication as they are either invalid or corrupted. Simply clear the saved cookies for that domain or all cookies for that particular fix.


Error code 403: Forbidden

403 Forbidden error

A hard “no” from server to client. This error usually means the option of authorizing is not available; the webpage is simply not accessible for web browsers or clients. Basically, the security at the door isn’t even checking ID.

This means the server knows what you’re asking, but just can’t let you in. This error usually serves as an extra layer of protection for your website, like if you want to keep certain resources private or secure.

Fix

If it’s a page which clients should be able to access, you can start by checking if the page is actually indexed in your cPanel.

All you need to do is navigate to the Advanced menu section and select Index manager from there.

Another fix could be to run a malware scan as those little buggers can corrupt the .htaccess file, which is your (standard) server configuration file.


Error code 404: Not Found

A 404 error code on HOSTAFRICA
A 404 error code on HOSTAFRICA

An error code with which we’re all familiar, especially when recalling memories after a heavy night out at the pub. Error code 404 rears its head when a client tries to access a page that is non-existent.

The most common cause is the URL hasn’t been typed in correctly, but can also pop up if the page has been removed from a website and no redirect has been implemented.

Fix

To patch this error, simply make sure you type the correct URL into the search bar.


Error code 408: Request Time-Out

This error indicates that the request sent by the client was not completed in the specified period of time demanded by the server. So, instead of waiting for the request to be fulfilled, the server closed the connection instead of waiting for the request to be completed.

You’ll often run into this error code if your internet is running slower than usual or the system is buckling under a heavy workload.

Fix

It can also be caused by an incorrect URL, so as with many of the other client error codes, make sure the URL is entered correctly.


Error code 410: Gone

Like the wind. Similar to the 404-error code, but the key difference is that the page or resource will never exist again. There’s no address that the page has be redirected to, and it’s not under construction of any sort. It’s simply gone.

This is in (slight) contrast to the 404-error code which can sometimes mean the page may be accessible in the future at some point. The 410-error code gives a clear message to the user to not search for the page again.

Sometimes this can be caused by a URL being typed incorrectly, but more often than not 410-errors are deliberate and final.


Conclusion

Those are the most common client-side HTTP status responses and what their usual causes are. Despite feeling like a brick wall sometimes when trying to access webpages, error codes provide us with reasonably clear answers as to what the issue is (if you know what each code means, which you do now).

Stay tuned for the most common server-side error codes and how to address them.


The Author

Ashwin S.

Alphabets are a random collection of symbols that, when put in a certain order, convey a specific meaning. We use our senses to understand this meaning. When we become immersed in the symbols' meaning, we're under the illusion that it's real - we hallucinate after looking at the symbols. Thus, I create hallucinations, using arbitrary symbols. In other words, I'm a writer. I've been a part of the Marketing Team since 2021 and am responsible for much of the text content HOSTAFRICA produces.

More posts from Ashwin