# 5xx errors

> 5xx errors mean the server failed to handle a request. Learn what each code points to, which layer to check first, and how to troubleshoot 500, 502, 503 and 504.

Canonical: https://scaplet.com/errors/http/5xx-errors

Guide Error · HTTP status codes

5xx errors mean the server failed to handle a request. Learn what each code points to, which layer to check first, and how to troubleshoot 500, 502, 503 and 504.

5 min

read

5

sources

Oct 25, 2026

updated

Scaplet Editorial Team

author

In one line

A 5xx error is an HTTP status code from 500 to 599 that means the server is aware it erred or can't perform the request. It can come from your application, a proxy or load balancer, or a CDN. Read the exact code, find which layer produced it, and check that layer's logs first. Visitors can only retry or wait.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F5xx-errors%20(%225xx%20errors%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F5xx-errors%20(%225xx%20errors%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F5xx-errors%20(%225xx%20errors%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F5xx-errors%20(%225xx%20errors%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 5 parts, 5 minutes.

1. [What a 5xx error means and who causes it 01](#what-a-5xx-error-means-and-who-causes-it)
2. [Find which layer sent it 02](#find-which-layer-sent-it)
3. [502, 503 and 504: the proxy errors 03](#502-503-and-504-the-proxy-errors)
4. [Cloudflare's own 52x codes 04](#cloudflare-s-own-52x-codes)
5. [What it does to SEO 05](#what-it-does-to-seo)

_01_The 5xx codes you will meet

## What a 5xx error means and who causes it

RFC 9110 says the 5xx class "indicates that the server is aware that it has erred or is incapable of performing the requested method." RFC 9110 adds that a server should send a representation explaining the error and whether it is temporary or permanent, and that these codes apply to any request method.

Code

### [500](/errors/http/500)

Standard meaning

The server encountered an unexpected condition that prevented it from fulfilling the request

Points to

The server's own software, often the application behind it

Code

### [501](/errors/http/501)

Standard meaning

The server does not support the functionality required, such as the request method

Points to

A method or feature the server doesn't implement

Code

### [502](/errors/http/502)

Standard meaning

A gateway or proxy received an invalid response from an [inbound](/glossary/inbound-marketing) server

Points to

The reply from the origin

Code

### [503](/errors/http/503)

Standard meaning

Temporarily unable to handle the request due to overload or scheduled maintenance

Points to

Capacity or maintenance; may include Retry-After

Code

### [504](/errors/http/504)

Standard meaning

A gateway or proxy did not receive a timely response from an upstream server

Points to

Origin speed or timeout settings

Code

### 505

Standard meaning

The server does not support the major HTTP version used

Points to

Protocol mismatch

Code

### [507](/errors/http/507)

Standard meaning

The server can't store the representation needed (WebDAV, RFC 4918)

Points to

Storage or quota

Several machines may sit between a visitor and your code: a CDN, a load balancer, a reverse proxy, then the application. Any of them can send a 5xx, and the code is the first clue to which one did.

_02_How it works

## Find which layer sent it

For most 5xx errors, Cloudflare says the correct course of action is to first contact your hosting provider or site administrator to troubleshoot and gather data. It lists what to share: the specific code and message, the time and timezone, and the URL that failed. It also says "The cause of the error is not always found in the origin server's error logs", so check the logs of any load balancers, caches, proxies or firewalls between Cloudflare and the origin.

1. 1

### Read the exact code and the page

Is it a plain browser page, your own error template, or a CDN's branded page? Cloudflare notes that its Custom Errors can alter the appearance of its default error pages.
2. 2

### Reproduce with the headers

Run `curl -I https://example.com/path` and read the status line and the `Server` or `Via` headers.
3. 3

### Check the outermost layer first

If a CDN is in front, look at its error analytics. Cloudflare's dashboard lets you filter by edge [status code](/glossary/http-status-codes) or origin status code, based on a 1% traffic sample.
4. 4

### Move inward

Check the load balancer, then the reverse proxy's error log, then the application log for the same timestamp.
5. 5

### Compare timing

A 504 means a gateway got no timely answer from upstream, so compare how long the request ran with the timeout settings of each hop.

See the status and which server answered

```
curl -sI https://example.com/page | head -20
```

**Check it in 2 minutes**Run the curl command from your laptop and again from a different network. If the status differs, something in the path to the server may be involved, not only the application.

_03_Check it

## 502, 503 and 504: the proxy errors

These three confuse people because a proxy is in the path. Use RFC 9110's wording to separate them: 502 is an invalid response from the inbound server, 503 is a server that is temporarily unable to handle the request, and 504 is no timely response. A 502 means the proxy reached something upstream and didn't like the reply, so look at what the origin sent back. A 504 means the reply never arrived in time, so look at origin speed and the timeout settings between the hops. For the nginx versions of the first and last, see [502 Bad Gateway in nginx](/errors/http/502/nginx) and [504 Gateway Timeout](/errors/http/504).

For planned downtime, send a 503 with a Retry-After header, which RFC 9110 says the server MAY send to suggest how long to wait. RFC 9110 also notes that 503 doesn't oblige a server to use it when overloaded; some servers simply refuse the connection.

A maintenance response with Retry-After

```
error_page 503 /maintenance.html; location / { add_header Retry-After 3600 always; return 503; } location = /maintenance.html { internal; add_header Retry-After 3600 always; }
```

_04_Explained

## Cloudflare's own 52x codes

Cloudflare adds codes that are not in the IANA registry (it has no 520 to 526 or 530 entry). It lists them as 520 web server returns an unknown error, 521 web server is down, 522 connection timed out, 523 origin is unreachable, 524 a timeout occurred, 525 SSL handshake failed, 526 invalid [SSL certificate](/glossary/ssl-certificate), and 530. Pages for the ones we cover: [521](/errors/http/521), [522](/errors/http/522), [523](/errors/http/523), [524](/errors/http/524), [525](/errors/http/525), [526](/errors/http/526) and [530](/errors/http/530).

_05_Explained

## What it does to SEO

Google's crawling guide says 5xx and 429 responses make its crawlers temporarily slow down. For indexed URLs, it says they are preserved in the index but eventually dropped if the errors persist, and that content received with a 5xx is ignored. It says a 500 reduces the crawl rate in proportion to the number of failing URLs. Once the server returns 2xx again, Google gradually increases the crawl rate. The audit page [server errors (5xx)](/seo-issues/server-errors-5xx) covers how to find them at scale, and the full code table is on the [HTTP status code list](/errors/http/http-status-code-list).

Related errors: [505](/errors/http/505), [506](/errors/http/506), [508](/errors/http/508), [510](/errors/http/510), [511](/errors/http/511).

Sources · 5

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- rfc-editor.org
- iana.org
- cloudflare.com
- google.com

1. 01 [RFC 9110: HTTP Semantics, section 15.6 Server Error 5xx](https://www.rfc-editor.org/rfc/rfc9110#name-server-error-5xx) rfc-editor.org · checked 2026-10-25
2. 02 [IANA: HTTP Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) iana.org · checked 2026-10-25
3. 03 [Cloudflare Docs: Cloudflare 5xx errors](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/) developers.cloudflare.com · checked 2026-10-25
4. 04 [RFC 4918: HTTP Extensions for WebDAV (507)](https://www.rfc-editor.org/rfc/rfc4918) rfc-editor.org · checked 2026-10-25
5. 05 [Google Search Central: How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-10-25

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What is an HTTP 5xx error?

A status code from 500 to 599 meaning the server is aware that it has erred or can't perform the request. The fault is on the server side, which can include a proxy or CDN.

_02_ How do I troubleshoot a 500 error?

Reproduce it with curl, then read the application's error log for the same timestamp. A 500 means the server hit an unexpected condition, so the log usually names the exception.

_03_ Why do I have a server error?

Something between the visitor and your code failed: the application, a proxy or load balancer, or a CDN. The exact code tells you which kind of fault to look for.

_04_ Will 5xx errors hurt my search rankings?

Google says it slows crawling when it sees 5xx responses and eventually drops URLs that persistently fail.

## Keep learning

[All errors](/errors)

[Learn 502 Bad Gateway HTTP status codes](/errors/http/502) [Related 5xx server errors Status codes and links](/seo-issues/server-errors-5xx) [Read next HTTP 500 Internal Server Error HTTP status codes](/errors/http/500) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in errors
[Cloudflare error 526: invalid SSL certificate](/errors/http/526) [Cloudflare error 530](/errors/http/530) [HTTP redirect codes](/errors/http/http-redirect-codes) [HTTP status code list](/errors/http/http-status-code-list)

More in HTTP status codes
[428 Precondition Required](/errors/http/428) [429 Too Many Requests](/errors/http/429) [451 Unavailable For Legal Reasons](/errors/http/451) [502 Bad Gateway](/errors/http/502) [503 Service Unavailable](/errors/http/503) [504 Gateway Timeout](/errors/http/504) [505 HTTP Version Not Supported](/errors/http/505) [506 Variant Also Negotiates](/errors/http/506) [507 Insufficient Storage](/errors/http/507) [508 Loop Detected](/errors/http/508) [510 Not Extended](/errors/http/510) [511 Network Authentication Required](/errors/http/511) [5xx errors](/errors/http/5xx-errors) [HTTP 200 OK](/errors/http/200) [HTTP 201 Created](/errors/http/201) [HTTP 204 No Content](/errors/http/204) [HTTP 206 Partial Content](/errors/http/206) [HTTP 301 Moved Permanently](/errors/http/301) [HTTP 302 Found](/errors/http/302) [HTTP 303 See Other](/errors/http/303) [HTTP 304 Not Modified](/errors/http/304) [HTTP 307 Temporary Redirect](/errors/http/307) [HTTP 308 Permanent Redirect](/errors/http/308) [HTTP 400 Bad Request](/errors/http/400)

Terms on this page
[Inbound marketing](/glossary/inbound-marketing) [HTTP status codes](/glossary/http-status-codes) [SSL certificate](/glossary/ssl-certificate)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
