It goes without saying that no one likes seeing error codes on the internet, especially when they’re on your own website.
As you’re probably aware, there are many of HyperText Transfer Protocol (HTTP) response status codes that can be issued by a server in response to a client’s request.
Ranging from 1xx through to 5xx, the first digit of a status code tells us which of the five classes the code originates.
In this article, we’ll be looking at only one of these categories.
What is 5xx server error?
Put simply, the 5xx error is a code that appears on internet browsers when the server has failed to fulfill a request.
It also tells us that the server is, in fact, aware that it has encountered an error, or is not able to complete the request.
It’s important to note that unless responding to a HEAD request, that the server should include an explanation of the error situation, as well as information regarding whether it is a temporary or a permanent issue.
How to detect a 5xx error code
Detecting a 500 server error can be quite difficult if it is located solely on one page, especially when you are the owner of a website with thousands upon thousands of pages.
Going through and inspecting each and every page would therefore not only be incredibly time-consuming, but it would also be very costly if you’re running a business.
Unless you’re lucky enough to have a user notify you upon discovering a 5xx error, the chances are that unless it is on a very important page, it might take weeks or even months before you discover that you have one or multiple 500 errors. To speed up the process of identifying them you can use different SEO tools (Oncrawl, Ahrefs, Moz, etc.). Some additional services, such as Serpstat, can provide you a one-page audit.
Doing so is important, as permanent 500 errors can not only affect SEO performance, but they can prevent users from accessing your site.
Understanding different 5xx server error codes
There are of course a range of 5xx server codes, and as a webmaster, knowing the difference between them is crucial so that you can rectify the issue:
500 – Internal Server Error
This status code is generated when the server has encountered an unexpected condition that prevented it from fulfilling the request by the client.
501 – Not Implemented
The web server will generate a 501 status code when it does not support the functionality required to process the request, and when the server does not recognize the request method.
This means that the server is not capable of supporting the request. It also implies that there could be availability in the future.
502 – Bad Gateway
A 502 error will be given when the server is acting as a gateway or proxy, and it has received an invalid response from the upstream server it accessed while attempting to process the request.
503 – Service Unavailable
A web server will respond with this status code when it is temporarily unable to handle the request due to short-term overloading or maintenance.
This is usually offered when the server is temporarily unavailable to complete the request. Sometimes the length of delay can be indicated in the Retry-After header.
If for some reason no Retry-After is offered, the client should handle the response the same as if it was a 500 response.
504 – Gateway timeout
If while acting as a gateway or proxy, the server did not receive a timely response from the upstream server specified by the request URL, a 504 error will be presented.
505 – HTTP Version Not Supported
If a web server responds with this status code, it means that it either does not support or refuses to support the HTTP protocol version used in the request message.
When this occurs, the response should contain an entity that explains why that HTTP version is not supported.
506 – Variant Also Negotiates
This code indicates that the server has an error located within its internal configuration and that the chosen variant resource is in fact configured to engage in transparent content negotiation.
This means, therefore, that it is not a proper endpoint within the negotiation process.
507 – Insufficient Storage
In this instance, the code is generated when the method could not be performed on the resource due to the fact that it cannot store the representation needed to complete the request.
Like the 503 server error, this condition is also temporary. This status code is because of a user action.
508 – Loop Detected
This message appears when the server has terminated an operation because of an infinite loop that is detected while processing a request with “Depth: Infinity”.
The status indicates that the entire operation has failed.
510 – Not Extended
A 510 server error occurs when the policy for accessing the resource has not been met within the request. In this case, the server should send back all information for the client to issue an extended request.
511 – Network Authentication Required
This error occurs when the client needs to authenticate themselves in order to gain access to the network.
A response representation from this kind of error should contain a link to a resource that allows users to submit their credentials.
You can find a full list of error codes, including codes from other classes, here.
Impact of 5xx errors on the SEO
When Google gets 5xx error on a site, it can lower a page’s ranking or drop it from the index, as such errors may cause a negative user experience. In fact, these errors have the most harmful impact on SEO.
They are the most difficult errors to fix. It’s hard to find the exact problem they indicate and its simplest solution. Also, often you can’t solve these problems by modifying the page code and you may need to apply to developers or server administrators for help.
Still, you should, and even must, fix them as search engines don’t like 5xx errors at all. A search engine can’t crawl and analyze your site if it gets 500 and 503 errors. This also means that 500 error codes can cause poor user experience and negatively impact on your site’s ranking and indexing.
Of course, your ranking will not drop as soon as a 5xx error appears. There have to be multiple instances of 503 responses over a week or two before the page is removed from Google’s index. And here you have time to fix them.
How to fix 500 error codes
Sometimes it can be difficult to pinpoint the source of a 5xx error, and they can occur if files are missing or corrupt, if there are incompatible upgrades, or if there are errors within scripts.
If you find that you have a 5xx response, there are a few verifications that you must carry out first:
- Reload the page in case the issue was merely momentary.
- Check the error log on the site.
- Consider any changes or upgrades to the system that you have carried out recently and roll them back until the issue is resolved.
It’s also worth inspecting any plugins that you have recently installed. Again, rollback any recently installed plugins until the issue is resolved.
Upgraded software can also be a culprit, and unsuccessful upgrades, missing files, or file corruptions can easily cause 5xx responses. If you’ve recently upgraded your software, try uninstalling the upgrade and try again.
New themes and plugins can also be incompatible with new software, so try pinpointing the issue by deactivating the plugins one by one until the issue is resolved.
Server-side scripts can also cause issues
When 500 errors appear on your website, it’s also worth checking your server scripts to try and resolve the issue:
- Check if the server permissions are correct. Permissions for a PHP or CGI script should be set to 0755 (-rwxr-xr-x).
- If the server can connect to external services, there could be a PHP timeout. Review your timeout rules and error handling. However, these can be difficult to locate, so the solution could be to simply remove external connections.
- Too many calls at once can cause a server timeout, alongside lost server connections and reboots, so test the script to ensure that this does not happen frequently.
- You could also have an error in an .htaccess file that could prevent a page from loading. Although rare, test this by temporarily removing the file and reload the page.
- If a webpage has a CGI or Perl extension, then you should check the script. Ensure to save CGI files in an ASCII format and ensure to upload them to the cgi-bin directory in the ASCII mode.
A 5xx server error is an error which occurs when server doesn’t fulfill a request. There are 10 types of this error. Each one is discussed in this article.
It’s quite difficult to detect and fix each occurence of these errors, but search engines don’t like them, especially 500 and 503 errors. Search engines can remove your site from their index after they repeatedly get such a response. To prevent deindexing, use SEO tools to audit your site and detect 5xx errors in time. You can fix errors using three strategies:
Reload the page to check if the issue was merely momentary.
Check the error log on the site.
Consider any changes or upgrades to the system that you have carried out recently and roll them back until the issue is resolved.