Skip to main content
SiteIndex

5xx Server Error

500 Internal Server Error

The server hit an unexpected error and could not complete the request.

Check a URL's HTTP status

What it means

A generic server-side failure. The real cause is in the server or application logs.

Common causes

  • An unhandled exception in application code.
  • A misconfigured server or .htaccess file.
  • A failed database connection.

How to fix it

  1. Check application and server error logs.
  2. Roll back the most recent deployment if the error started after it.
  3. Verify database and environment variables.

Example response

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8

Worked example

A gateway or server cannot complete an otherwise valid request. Check the origin service and proxy logs, correct the server-side cause, then retry after the service is healthy.

How to read this response

  1. Find the status line in your browser's Network panel, API client, or server access log.
  2. Read the response body and headers shown above; headers such as Location, Allow, Retry-After, and WWW-Authenticate explain the next step.
  3. Use the code's class to orient your diagnosis: informational, successful, redirected, request-related, or server-side.

SEO impact

Persistent 500s cause search engines to crawl less and eventually drop pages. Fix them quickly and monitor uptime.

How to check a status code

Enter a URL in the HTTP Status Checker to see its status code, every redirect hop, and response time. For redirect-heavy pages, the Website Speed Test shows how much time redirects add.

Frequently asked questions

What it means: HTTP 500
500 Internal Server Error: The server hit an unexpected error and could not complete the request.
Common causes: 500
An unhandled exception in application code. A misconfigured server or .htaccess file. A failed database connection.
How to fix it: HTTP 500
Check application and server error logs. Roll back the most recent deployment if the error started after it. Verify database and environment variables.

Defined in RFC 9110.

Related codes

Tools