Common website error codes
Here we list some of the common error codes you can run into when working with websites, and what they mean. We have also put together recommended actions you can try in order to solve the problem behind the error code being shown.
404: The page cannot be found
This is an error code we have probably all run into while browsing the web. Error code 404 means that the path the visitor is trying to reach cannot be found by the server.
Recommended action: Check that the path (the URL) is correct. If it is, troubleshoot on the server whether the file really exists at that path.
500: Internal server error
This can be caused by quite a few different things. Error code 500 means that the server has some problem with the request being made. It could be that the permissions are not sufficient, or that some other part of the request is not working as it should, for example an error in the application code.
Recommended action: Check the file permissions and that the files are owned by the right user. Look at the error log on the server to see whether it can give a more detailed answer about what is causing error message 500.
502 and 504: Bad gateway and gateway timeout
Error codes 502 and 504 appear when a proxy or load balancer in front of the web server cannot reach its upstream server. With 502 the proxy gets an invalid response or no response at all, with 504 the response takes too long to arrive.
Recommended action: Check that the service behind the proxy is running and responding, and look at the proxy’s error log.
401: Unauthorized
You do not have access to the page for some reason. If you are supposed to have access, the authentication is not correct.
Recommended action: Double check the login credentials.
403: Forbidden
The server understands the request but refuses access to the page, regardless of login.
Recommended action: Check whether the .htaccess file is blocking the path even though it should not, and that the file permissions allow the web server to read the file.
Where to troubleshoot next
The error codes above come from the web server, which means the server is actually responding. If the site cannot be reached at all, the problem may instead be in the name resolution: how DNS works. If you run the site in Plesk, you find error logs and file permissions in the control panel, see how Plesk works.