5xx Server Errors | How To Fix Them In A Simple Steps Guide

What happened to your site now that you want to learn how to fix 5xx server errors? It means 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 website owner, it means the connection to the origin web server was made.

But the origin web server timed out before responding. The likely cause is an overloaded background task, database, or application, stressing the resources on your web server. You can work with your hosting provider or web development team to resolve this. They’ll help free up some resources for your database or overloaded application. Unfortunately, at times, all these efforts might 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 idea of an edge server or caching server.

What Are 5xx Server Errors?

No one likes seeing error codes online, especially on your website. As you’re probably aware, a server can issue many HyperText Transfer Protocol (HTTP) response status codes 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 other words, 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, the server should include an explanation of the error situation and 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 can process, 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 the client and the origin server required for a secure internet connection using SSL/TLS also adds additional latency to the request.

Ultimately, all this directly impacts the client’s experience requesting data from the origin. By using a Content Delivery Network (CDN) such as Cloudflare, the round-trip time is highly reduced. The number of requests to an origin server is also reduced to a more significant percentage.

How To Detect 5xx Server Errors

Detecting a 500 server error can be tricky if it is located solely on one page, especially when you own a website with thousands upon thousands of pages. Going through and inspecting every page would, therefore, 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 significant page, it might take weeks or even months to find out that you have one or multiple 500 errors. When troubleshooting most 5XX errors, contacting your hosting provider or site administrator to troubleshoot and gather data is the correct action.

Understanding Different 5xx Server Error Code Types

You can use different SEO tools to speed up the process of identifying 5xx Server Errors (OnCrawl, Ahrefs, Moz, etc.). Some additional services, such as Serpstat, can provide a one-page audit. Doing so is essential, as permanent 500 errors can affect SEO performance and prevent users from accessing your website.

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 prevents 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 proposal. It also implies that there could be available in the future.

502 – Bad Gateway

A 502 error will be given when the server acts as a gateway or proxy and receives 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 can temporarily 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 does 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 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 explaining why that HTTP version is unsupported.

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 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 cannot be performed on the resource because 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 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 to gain access to the network. A response to this error should contain a link to a resource allowing users to submit their credentials. Here, you can find a complete list of error codes, including codes from other classes.

The 5xx Server Errors Impact 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. As such, errors may cause a negative user experience. 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 challenging to pinpoint the source of 5xx Server Errors. 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.

Consider the following:
  1. Reload the page in case the issue was merely momentary.
  2. Check the error log on the site.
  3. Consider any changes or upgrades to the system 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, roll back 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 problems. When 500 errors appear on your website, it’s also worth checking your server scripts to try and resolve the issue.

Consider the following:
  • Check if the server permissions are correct. Permissions for a PHP or CGI script should be set to 0755 (-rwxr-xr-x).
  • There could be a PHP timeout if the server can connect to external services. Review your timeout rules and error handling. However, these can be difficult to locate, so the solution could be to 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 reloading the page.
  • You should check the script to see if a webpage has a CGI or Perl extension. Ensure to save CGI files in an ASCII format and upload them to the cgi-bin directory in the ASCII mode.


As can be seen, there are different ways to fix 5xx server errors when the server doesn’t fulfill a request. There are 10 types and ways to fix 5xx server errors, as discussed in this article.

It’s pretty challenging 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 getting such a response repeatedly. Use SEO tools to audit your site and detect 5xx mistakes in time to prevent deindexing.

Fix mistakes using these 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 you have carried out recently and roll them back until the issue is resolved.

Finally, if you need further help fixing 5xx server errors, you can Consult Us or share your additional contributions in our comments section. You can also Donate to support our blog and other ongoing research work.

Get Free Newsletters

Help Us Spread The Word