Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

5xx Server Errors: What They Mean and How to Fix Them

5xx server errors are HTTP codes that mean your server failed to answer. Learn what codes 500 to 511 mean, why they happen and how to fix them.

Sorank customerSorank customerThomas Girauc, Sorank customerCelio Fabiano, Sorank customerSorank customerXavier Breull, Sorank customer
+ 9'000 Subscribers
5xx Server Errors: What They Mean and How to Fix Them
Notification: your site reached 20K clicks from Google Search in 28 days

Tools

On this page

Summary

5xx server errors are HTTP status codes that mean the server failed to handle a request that looked valid. The fault sits on the server side, not with the visitor. The codes run from 500 to 599, and the most common are 500, 502, 503 and 504. Most can be fixed on the server.

Want to go further? Ask

5xx server errors are the family of HTTP responses whose status code starts with a 5. HTTP is the protocol that browsers and crawlers use to ask for a page. The first digit of the status code tells you who is at fault. A 4 means the request was wrong. A 5 means the server failed. When your site returns one of these, a visitor or a search engine asks for a page and gets no usable answer. This guide explains what each code means, what causes it, how to find the real problem and how to fix it.

What is a 5xx server error?

A 5xx status code is a three-digit number that a server sends back with every reply. The first digit is the class. A 2 means success, a 3 means redirect, a 4 means the request was wrong, and a 5 means the server itself could not complete the job. So a 5xx response tells you that the request reached the server, but the server could not finish it.

You meet 5xx errors as an error page, a blank page or a short message such as "Service Unavailable". Browsers show the message to visitors. Crawlers from Google and AI systems see only the number, and they treat it as a failed visit.

Which 5xx status codes exist, and what does each one mean?

The IANA registry is the official list of HTTP status codes. It names the codes from 500 to 511, but only a few of them appear on normal websites. The table below lists each code with its usual cause.

CodeNameUsual cause
500Internal Server ErrorA generic failure: a bad configuration, a code exception or a file permission problem
501Not ImplementedThe server does not support the feature or method the request uses
502Bad GatewayA proxy or load balancer got an invalid answer from the server behind it
503Service UnavailablePlanned maintenance, or a server overloaded and refusing new requests
504Gateway TimeoutA proxy waited too long for the server behind it to answer
505HTTP Version Not SupportedThe request uses an HTTP version the server does not accept
506Variant Also NegotiatesA configuration error in content negotiation, where the server picks the wrong version of a resource
507Insufficient StorageThe server has no room left to store the data the request needs
508Loop DetectedThe server found a loop while it processed the request
509UnassignedNot in the official list. Some hosts send it anyway to signal a bandwidth limit
510Not ExtendedObsolete. You should not see it today
511Network Authentication RequiredThe network wants a login first, often a hotel or office Wi-Fi portal

The most common codes are 500, 502, 503 and 504. The 500 code is a catch-all. MDN describes 500 as a generic "catch-all" response that the server sends when no more precise 5xx code fits. That is why a 500 tells you that something broke, but not what broke. The logs have to tell you that.

What causes a 5xx server error?

The cause is almost always on the server or in the software it runs. The MDN page on the 500 code lists the usual causes: improper server configuration, out-of-memory problems, unhandled exceptions in the code and improper file permissions. On many sites, a recent update, a new plugin or a new code release is the trigger, so ask what changed first.

Traffic can cause them too. When a server runs out of memory, connections or CPU, it may refuse new requests with a 503. A 502 or 504 usually means a second system, such as a proxy, a CDN or a database host, failed or answered too slowly.

MDN page defining the 500 Internal Server Error status as a generic catch-all response
Screenshot of developer.mozilla.org

How do 5xx errors affect Google and AI crawlers?

Google's guidance on HTTP network errors says that 5xx errors prompt its crawlers to slow down for a while. Once the server answers with a normal response again, Google raises the crawl rate gradually. The content of a URL that returns a 5xx is ignored. A page that was already indexed stays for a time, but a URL that keeps returning a server error is eventually dropped from the index. The rate at which Google visits your site is explained in crawl budget, and the basics of how bots reach a page are in crawling.

Google Search Central page explaining how 5xx errors slow crawling and affect indexing
Screenshot of developers.google.com

AI crawlers face the same problem. If a bot gets a 5xx response, it gets no page to read, so there is nothing to cite. A short outage does little harm. A site that fails for days loses its place.

How do you find the cause of a 5xx error?

Work from evidence, not from guesses. Follow these steps in order.

  1. Check the status code yourself. Open the failing URL with a free HTTP headers checker, which shows the final status code and the response headers. Test one normal page and one failing page, so you know whether the problem covers the whole site.
  2. Read the server error log. MDN notes that server administrators can log each error response with the request that caused it. The log holds the error message, the file and the time. This is usually the fastest route to the cause of a 500.
  3. Find the timing. Note when the errors began, and compare that moment with your last update, deployment, plugin change or traffic spike. If the errors arrive at the same hour each day, look for a scheduled job.
  4. Check what the bots see. Use the crawl reports in Search Console, explained in crawl stats, and your server logs, explained in log file analysis for SEO. A 5xx that appears only for Googlebot points to a firewall or a rate limit, not to your application.
  5. Reproduce the error. Load the page in a private window, and load it several times in a row if you can. A problem that appears only when many visitors arrive together is a capacity problem.

How do you fix a 5xx server error?

The fix depends on the cause. Match the code to the table above, then act on what the logs show.

  • For a 500, roll back the last change, then fix the error the log names: a configuration line, a missing file or a permission. Raise the memory limit only when the log shows that memory is the problem.
  • For a 502 or 504, check the second system: the database, the CDN origin or the application host. Raise its timeout only after you know why it is slow.
  • For a 503 during planned maintenance, say so with a Retry-After header. MDN says this header should hold the estimated time for recovery, if possible, and that the 503 should be used only for temporary conditions.
Retry-After: 3600

That header tells a client to wait 3600 seconds, which is one hour, before it tries again.

  • For a 503 caused by overload, add caching, a bigger server or a CDN in front of the site. Lowering the load is usually faster than raising limits.
  • After each fix, check the URL again. Normal pages should return a 200 status code. Sorank's free headers checker is a quick way to confirm that, but it does not repair the server itself.

Tip

Fix the root cause, then keep watching. Google raises its crawl rate again only after normal responses return, so check the crawl reports for several days after the fix.

Common 5xx server error mistakes

Mistake 1: Restarting the server and never finding the cause

What it is: you restart the server, the site comes back, and you move on. How to spot it: the errors return at the same time of day, or after the next deployment. How to fix it: read the log from the first error after the last clean period, and fix the trigger it names.

Mistake 2: Leaving a maintenance 503 in place after the work is done

What it is: the maintenance page keeps returning a 503 for days after the site is back. How to spot it: the headers checker still reports 503 on normal pages. How to fix it: return the normal 200 response as soon as the site works again. Google drops URLs that keep returning server errors from its index, so a long 503 can cost you pages.

Mistake 3: Showing an error message with a 200 status

What it is: the site displays "Something went wrong" but sends a 200 OK code. How to spot it: the headers checker reports 200 for a page that shows an error. How to fix it: send the real 5xx code together with the error page. Search engines can index a 200 error page as a real page. The same trap appears with missing pages, explained in soft 404 errors.

Mistake 4: Blocking crawlers with a firewall or rate limit

What it is: a security rule answers bots with a 503 error. How to spot it: your logs show the errors only for bot user agents, while normal visitors load the page without trouble. How to fix it: allow verified search crawlers, check that your rules match the official crawler addresses, and never block by user agent name alone.

Mistake 5: Ignoring a single failing template

What it is: only the product pages, or only one language, return a 500. How to spot it: a crawl or log report shows the errors clustered on one URL pattern. How to fix it: test one URL from the cluster, find the template or plugin that builds those pages, and fix that one thing. The same pattern shows up in the reports covered in crawl errors.

Why do 5xx server errors matter for SEO and GEO?

For SEO, a 5xx error stops the crawl of the page that fails, slows the crawl of the whole site, and drops pages from the index when it lasts. For GEO, an AI system that cannot fetch your page cannot quote it. Slow pages also cause 504 errors when a proxy gives up on them, so speed work and error work overlap. See page speed for that side of the problem.

Conclusion

A 5xx error means the server failed, not the visitor. Read the status code, read the log, fix the cause and check the result. Keep the errors short, because search engines and AI systems can only use pages that load.

Sources

Frequently asked questions

What is the difference between a 4xx and a 5xx error?

A 4xx error means the request was wrong, for example a page that does not exist. A 5xx error means the request was fine, but the server failed to complete it. A 5xx fix happens on your server, not in the visitor's request.

Is a 500 error bad for SEO?

One short 500 error does little harm. Google says that 5xx errors make its crawlers slow down, and a URL that keeps returning server errors is eventually dropped from the index. Fix the cause before the errors last for days.

How do I check which status code my page returns?

Use a free HTTP headers checker. It shows the final status code of a URL, after any redirects. Check a normal page and a failing page, so you can compare them.

Our Blog for Ambitious Company

Testimonials from ambitious founders

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.frGoogleE-commerce

0 to 5000 visits in 8 months

Thibault BMsorank.comGoogleSoftware

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.comGoogleLeisure and aviation

0 to 163 clicks in 6 months

Coworking Pariscoworking-paris.frGoogleOffice broker

x92 clicks in 7 months

Guide Zanzibarguidezanzibar.comGoogleTravel