# HTTP 500 Internal Server Error

> HTTP 500 means the server hit an unexpected condition and could not finish the request. See the causes, what visitors can try, and how owners trace and fix it.

Canonical: https://scaplet.com/errors/http/500

Guide Error · HTTP status codes

HTTP 500 means the server hit an unexpected condition and could not finish the request. See the causes, what visitors can try, and how owners trace and fix it.

4 min

read

4

sources

Oct 22, 2026

updated

Scaplet Editorial Team

author

500 5xx · Server error

The short answer

HTTP 500 Internal Server Error means the server encountered an unexpected condition that prevented it from fulfilling the request. It is a generic catch-all for server-side failures, so the fix is usually with the site owner or host. Visitors can retry later; owners should read the error log for the failing request and fix the code or configuration it points to.

1. [What a 500 means and who causes it](#what-a-500-means-and-who-causes-it)
2. [How to get past a 500 as a visitor](#how-to-get-past-a-500-as-a-visitor)
3. [How to find and fix the cause as a site owner](#how-to-find-and-fix-the-cause-as-a-site-owner)
4. [What it does to SEO](#what-it-does-to-seo)

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%2F500%20(%22HTTP%20500%20Internal%20Server%20Error%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%2F500%20(%22HTTP%20500%20Internal%20Server%20Error%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%2F500%20(%22HTTP%20500%20Internal%20Server%20Error%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%2F500%20(%22HTTP%20500%20Internal%20Server%20Error%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_Who causes a 500

## What a 500 means and who causes it

RFC 9110 defines 500 as a status that "indicates that the server encountered an unexpected condition that prevented it from fulfilling the request." MDN calls it a generic "catch-all" response used when the server cannot find a more appropriate 5xx code. That is why a 500 tells you where the failure was (on the server) but not why.

Source

### Application code

Typical cause

Unhandled exception, bad input the code did not expect, failed dependency

Who can fix it

Developer

Source

### Server configuration

Typical cause

A rule, directive or permission the server cannot apply

Who can fix it

Site owner or host

Source

### Resources

Typical cause

Out of memory, exhausted database connections

Who can fix it

Site owner or host

Source

### Edge code (Cloudflare Workers)

Typical cause

JavaScript runtime exceptions in a Worker

Who can fix it

Developer

MDN lists improper server configuration, out-of-memory issues, unhandled exceptions and improper file permissions among the many possible causes. A visitor cannot fix any of them. Cloudflare says a 500 from a site behind it indicates a problem with your origin web server, and calls "Error establishing database connection" a common 500 message.

_02_How it works

## How to get past a 500 as a visitor

1. 01

### Reload once

A reload costs nothing and rules out a one-off failure.
2. 02

### Come back later

MDN says 500s require investigation by server owners or administrators. There is nothing to fix on your side if other sites load normally.
3. 03

### Tell the site if it keeps failing

Send the URL and the time. The site owner needs both to find the matching log entry.
4. 04

### Do not retry a payment or a form repeatedly

The server may have completed part of the work before failing. Check for a confirmation email or account entry first.

_03_How it works

## How to find and fix the cause as a site owner

RFC 9110 says a server SHOULD send a representation that explains the error and whether it is temporary or permanent. In production, keep that public message generic and put the detail in logs. Then work from the log entry for one failing request.

1. 1

### Reproduce one failing request

Note the URL, method, time and request ID if you have one. A `curl -i` against the URL shows the status and headers.
2. 2

### Find the matching log entry

Look in the application log and the web server error log for that time. A stack trace or a specific error message usually names the file or dependency.
3. 3

### Check what changed

Compare against the last deploy, configuration change, dependency update or traffic spike. Roll back if the timing matches.
4. 4

### Check resources and dependencies

Look at memory, disk, database connections and any third-party API the request calls.
5. 5

### Fix, then retest the exact request

Confirm the status changes to the one you intend, and watch the logs for new entries.

Node.js: log the cause, return a generic 500

```
import http from "node:http"; const server = http.createServer(async (req, res) => { try { await handle(req, res); // your application code } catch (err) { console.error(req.method, req.url, err); // detail goes to logs res.writeHead(500, { "Content-Type": "text/plain" }); res.end("Something went wrong on our side."); } });
```

**If the site is behind Cloudflare**Cloudflare suggests four checks: review recent changes to Page Rules or Transform Rules, verify the origin is responding, check Workers logs for exceptions, and pause Cloudflare temporarily to see whether the error comes from your server. If the error page itself mentions "cloudflare" or "cloudflare-nginx", contact Cloudflare support with the time, your domain and the output of `/cdn-cgi/trace`.

A 500 that appears only when a proxy is in front may really be a gateway problem; compare [502 Bad Gateway](/errors/http/502) and [503 Service Unavailable](/errors/http/503). Use 503, not 500, for planned maintenance, because it signals that the condition is temporary.

_04_Explained

## What it does to SEO

Google says a 500 makes it decrease the crawl rate for the site, in proportion to the number of individual URLs returning a server error, and its indexing pipeline removes URLs that persistently return a server error. Content in a 5xx response is ignored. See [5xx server errors](/seo-issues/server-errors-5xx) for how to find affected URLs and confirm recovery, and Google's documentation on how [HTTP status codes](/glossary/http-status-codes) affect its crawlers.

Sources · 4

## Every fact, linked and dated.

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

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

1. 01 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-10-25
2. 02 [MDN: 500 Internal Server Error](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/500) developer.mozilla.org · checked 2026-10-25
3. 03 [Cloudflare: Error 500](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-500/) developers.cloudflare.com · checked 2026-10-25
4. 04 [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 does the internal server error mean?

The server hit an unexpected condition and could not complete the request. It is a general server-side failure, not a problem with your browser or connection, and the cause is not stated in the response.

_02_ What is the difference between HTTP 500 and 503?

A 500 is a generic failure from an unexpected condition. A 503 says the server is currently unable to handle the request because of a temporary overload or scheduled maintenance, and may include a `Retry-After` header. See [503 Service Unavailable](/errors/http/503).

_03_ Can I fix a 500 error as a visitor?

No. MDN says 500 errors require investigation by server owners or administrators. You can reload or come back later, and report the URL and time to the site.

_04_ How do I find the cause of a 500 on my site?

Reproduce one failing request, find its entry in the application and web server logs, and compare the time with your last deploy or configuration change. The stack trace or error message normally points to the cause.

## Keep learning

[All errors](/errors)

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

Other 500 errors
[Vercel 500: Internal Server Error](/errors/cdn/vercel-500)

Nearby in errors
[451 Unavailable For Legal Reasons](/errors/http/451) [502 Bad Gateway](/errors/http/502)

More in HTTP status codes
[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) [HTTP 401 Unauthorized](/errors/http/401) [HTTP 405 Method Not Allowed](/errors/http/405) [HTTP 407 Proxy Authentication Required](/errors/http/407) [HTTP 408 Request Timeout](/errors/http/408) [HTTP 409 Conflict](/errors/http/409) [HTTP 412 Precondition Failed](/errors/http/412) [HTTP 431 Request Header Fields Too Large](/errors/http/431) [HTTP 499 Client Closed Request](/errors/http/499) [HTTP 500 Internal Server Error](/errors/http/500) [HTTP 501 Not Implemented](/errors/http/501) [HTTP redirect codes](/errors/http/http-redirect-codes) [HTTP status code list](/errors/http/http-status-code-list) [REST API status codes](/errors/http/rest-api-status-codes) [100 Continue](/errors/http/100) [101 Switching Protocols](/errors/http/101) [402 Payment Required](/errors/http/402) [403 Forbidden](/errors/http/403) [404 Not Found](/errors/http/404) [406 Not Acceptable](/errors/http/406) [411 Length Required](/errors/http/411)

Terms on this page
[HTTP status codes](/glossary/http-status-codes)

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
