All HTTP status codes
5xx Server Error
RFC 9110

500 Internal Server Error

A generic server-side error — the server encountered an unexpected condition.

What it means

HTTP 500 Internal Server Error is the catch-all server error. It means something went wrong on the server but the server cannot or will not be more specific. Almost always indicates a bug or misconfiguration.

When it's used

Unhandled exceptions, database connection failures, configuration errors, code crashes.

Common causes
  • Unhandled exception in application code
  • Database connection lost
  • Out of memory error
  • Misconfigured environment variables
  • Third-party API call failed without graceful handling
How to fix it
  • Check server error logs for the stack trace
  • Implement global error handlers in your framework
  • Add monitoring (Sentry, Datadog) to catch errors immediately
  • Validate environment variables on startup
  • Implement circuit breakers for third-party calls
Example response
HTTP/1.1 500 Internal Server Error
Content-Type: text/html

<h1>Internal Server Error</h1>
SEO impact

Critical — Googlebot will retry but persistent 500s lead to deindexing. Monitor and fix immediately.