What happened to your site now that you want to learn how to fix 5xx server errors? It means that the origin web server timed out responding to your service request. So, what can I do? If you’re a visitor of the specific website delivering this message, you can try again in a few minutes.
On the other hand, if you’re the owner of this website, it means the connection to the origin web server was made, but the origin web server timed out before responding. And the likely cause is an overloaded background task, database, or application, stressing the resources on your web server.
To resolve this, you can try and work with your hosting provider or web development team. Whereby, they’ll help you to free up some resources for your database or overloaded application. Unfortunately, at times, all these efforts might all fail.
As a webmaster, you very well know that the purpose of an origin server is to process and respond to incoming internet requests from internet clients. The concept of an origin server is typically used in conjunction with the concept of an edge server or caching server.
What are 5xx Server Errors?
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.
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.
What causes 5xx Server Errors?
At its core, an origin server is a computer running one or more programs that are designed to listen for and process incoming internet requests. It can take on all the responsibility of serving up the content for an internet property such as a website.
Provided that the traffic does not extend beyond what the server is capable of processing and latency is not a primary concern. The physical distance between an origin server and a client making a request adds latency to the connection.
Related Topic: How to Auto Refresh Web Pages | Top 5 Extensions to use
As a result, this increases the time it takes for an internet resource such as a webpage to be loaded. The additional round-trip time (RTT) between client and origin server required for a secure internet connection using SSL/TLS also adds additional latency to the request.
In the end, all this directly impacts the experience of the client requesting data from the origin. By using a Content Distribution Network (CDN) such as Cloudflare, the round-trip time is highly reduced. And the number of requests to an origin server are also reduced to a greater percentage.
How to detect 5xx Server Errors
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.
When troubleshooting most 5XX errors, the correct course of action is to first contact your hosting provider or site administrator to troubleshoot and gather data. You can read and learn more in this article.
Understanding different types of 5xx server error codes
To speed up the process of identifying 5xx Server Errors, 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.
There are of course a range of 5xx Server Errors. 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 available 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 the 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.
What is the Impact of 5xx Server Errors on the SEO?
When Google gets a 5xx error on a site, it can lower a page’s ranking or drop it from the index. And 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.
Related Topic: How to Increase your Site Domain Authority in Simple Steps
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 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 5xx Server Errors
Sometimes it can be difficult to pinpoint the source of 5xx Server Errors. 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.
Related Topic: Why Cloudflare is the Best for Web Performance & Security
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 a .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.
Takeaway,
As can be seen, there are different ways to fix 5xx server errors that occur when the server doesn’t fulfill a request. And there are 10 types and ways to fix 5xx server errors as discussed in this article.
It’s quite difficult to detect and fix 5xx server errors each occurrence of these error codes. 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.
Related Topic: What is Bounce Rate? 8 Ways to improve a site conversion
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.
Finally, if you’ll need further help to fix 5xx server errors, you can Contact Us or even share your additional contributions in the comments section.
You can also donate in order to support our blog articles and other ongoing research work here.