Encountering an error message on your computer screen can be extremely frustrating, yet it happens to the best of us. Fortunately, most error codes have easy fixes that don’t require a computer science degree to figure out.
Here are some of the most common error codes you might come across when accessing an application or web server and its solutions.
What causes an HTTP error code?
When a client or browser tries to access a server or website, it sends a request. Depending on how the server handles the request from the client, it responds with an HTTP (Hypertext Transfer Protocol) status code. These status codes consist of three digits and can be sorted into five different categories determined by the first digit.
If the HTTP code starts with 1, the server received the request and understood. The request is still continuing to process and the client must wait for a response. An HTTP code that begins with 1 is an informational response.
If the HTTP code starts with 2, the server successfully received, understood, and accepted the request. An HTTP code that begins with 2 is a successful response.
If the HTTP code starts with 3, the server needs additional action to complete the request. An HTTP code that begins with 3 is a redirection response.
If the HTTP code starts with 4, the server cannot fulfill the request due to an error caused by the client. An HTTP code that begins with a 4 is a client error response.
If the HTTP code starts with a 5, the server is unable to fulfill the request. The server recognizes its failure to complete the valid request made by the client. An HTTP code that begins with a 5 is a server error response.
As a result, HTTP error codes typically begin with a 4 or a 5. These error codes are caused either by the user client or the webserver.
400 Bad Request
If you encounter this error message, it means the server is unable to process the request due to a client error. The 400 error code occurs as a result of a request with an incorrect syntax or invalid request message framing. This status code displays when the request received by the server from the client is corrupt or wrong.
How to fix the 400 Bad Request error
Check the address for any typos. Mistyped URLs are one of the most common reasons for this error. If you clicked the link from another source, there’s a chance the link was entered incorrectly.
Refresh the page. Sometimes, the 400 Bad Request error message can be fixed with a quick refresh.
Use a search engine to find the correct address. If you know the name of the article or webpage the URL is intended to reach, perform a search using a search engine. You can also use the URL to discern keywords to use in your search.
Clear the browser’s cookies and cache. Some servers will respond with a 400 Bad Request error if the cookies or cache in your browser are corrupt somehow.
You will be required to sign in again on websites, but if you want to fix this error, clearing your browser’s cookies and the cache is worth a shot. Here is a guide for how to clear your cache and cookies for Chrome users, Firefox users, and Internet Explorer users.
If you encounter this HTTP error code while uploading a file, ensure the size of the file is not too large. If you can successfully upload a smaller file without receiving this error message, the size of your file is too big.
404 Not Found
This is one of the most common HTTP error codes. Users who come across the 404 Not Found error message on their screen have successfully conveyed their request to the server, but it could not locate the resource or file requested. Chances are, the client has entered a broken link that the server could not find because it does not exist.
How to fix the 404 Not Found error
Check your URL for typos if you typed it manually. If you clicked a link, there’s a chance the link provided may be wrong.
Refresh the page. This quick solution is always worth a try. Although error codes that begin with a 4 are typically caused by client error, there’s a small chance the server glitched.
Use a search engine to find the correct address. If you know the name of the website the URL is meant to display, try a search engine. There are keywords in the URL that might be useful for your search if you do not know the exact name of your intended destination.
Clear your browser’s cache. If you have visited this page before, there’s a chance the website changed the link, but the broken link is still stored in your browser’s cache. Here is a guide on clearing your web browser’s cache for Chrome, Firefox, and Internet Explorer.
Change DNS servers. If you can access the webpage on your mobile data but not on your home network, there might be a problem with your DNS servers. Here is a guide by Google for changing your DNS servers settings.
500 Internal Server Error
The 500 Internal Server Error is one of the more mysterious HTTP error codes. This response from the server means that it was unable to process unexpectedly but could not identify a more specific reason.
This means there is an issue with the website so the solution may be out of your hands. However, there are still some fixes worth a try just in case.
How to fix the 500 Internal Server Error
Refresh the page. Most of the time, websites are almost immediately aware of internal server errors and work quickly to fix them. Wait a few minutes then refresh the page to check if the server has solved the issue.
Contact the website. If you know another way to contact the owner of the website, it might be helpful to inform them of the error so they can work to fix it.
Check again later. If you give it enough time, the issue will likely be resolved by the website’s developer.
502 Bad Gateway
This error appears when the server acts as a gateway or proxy, but could not receive a response from the upstream server that is meant to fulfill the request. This means that the server is receiving an invalid response from another server.
Similar to other error codes that begin with a 5, the server error must usually be fixed by the website. However, sometimes, it may be caused by your computer or network.
How to fix the 502 Bad Gateway error
Refresh the page. If the 502 error is temporary, a quick refresh might solve the issue.
Use another browser. To ensure your browser isn’t the problem, try accessing the website using another browser.
Clear your browser’s cache and cookies. If another browser works, clear the cache and cookies of the browser that is receiving the error. Here is a guide for how to clear your cache and cookies for Chrome users, Firefox users, and Internet Explorer users.
Check if the site is down. To make sure the error is in fact caused by the server, check if other people are having trouble accessing it. You can check here if the website is down or not for other users.
504 Gateway Timeout
Similar to the 502 error, the 504 Gateway Timeout error code occurs when a server acts as a gateway or proxy. It appears when the server could not receive a valid response in time from another server. Since this is a server error, the problem must be fixed by the website itself. Still, there are some quick fixes worth trying.
How to fix the 504 Gateway Timeout error:
Refresh the page. Some 504 errors are temporary due to high traffic. If this is the case, it might be fixed with a quick refresh.
Check if the site is down. To make sure the error is a server issue, check if the site is down of other users. You can check here if the site is down for everyone.
Check again later. If the website is down for everyone, the only fix may be to give the web developer to resolve the issue.
Use another browser. To ensure your browser isn’t causing the issue, try using another browser to access the website.
Restart your router. Sometimes, the 504 Gateway Timeout error may be caused by a problem with your network connection. If this is the case, restarting your router should solve it.
Although no one wants to encounter any of these error codes, the ability to identify the most common website error messages and their quick fixes can save a user from much frustration and panic. While some server errors are out of your hands, these solutions are worth a try just in case.
Michael Dehoyos is a web developer and editor at Write my literature review. He enjoys assisting companies find creative solutions to their tech and marketing problems.