5xx Server error
500 Internal Server Error
The server hit an unexpected error.
A generic server-side failure, usually an unhandled exception in application code.
Common causes and fixes
- Check the server logs and error tracking for the stack trace — the response rarely says why.
- Common causes: null/undefined access, failed database queries, missing environment variables, and unhandled input the code didn’t expect.
- Return 4xx for bad input instead of letting it crash into a 500.
Example response
HTTP/1.1 500 Internal Server Error
Date: Thu, 22 Oct 2026 08:00:00 GMT Check a URL’s status with curl -I https://example.com, which prints the status line and headers.