500 Internal Server Error

HTTP 500 Internal Server Error is a 5xx server error status. Something went wrong on the server and it has no more specific code to give.

500Status code
5xxServer error
NoCacheable by default
RFC 9110 §15.6.1Defined in

Common causes

What to do

Check the server error log; the browser side cannot fix it. Never show stack traces to users in production.

Example response

HTTP/1.1 500 Internal Server Error
Content-Type: application/problem+json

{"status":500,"title":"Internal Server Error"}

Returning 500 in code

Express   res.status(500).json({ … });
Flask     return jsonify(…), 500
PHP       http_response_code(500);
Go        w.WriteHeader(500)
nginx     return 500;

Other 5xx codes

Frequently asked questions

What does HTTP 500 mean?
Something went wrong on the server and it has no more specific code to give.
Is 500 an error?
Yes. It is a server error: the request may be fine and the problem lies on the server or an upstream service.
Does a 500 hurt SEO?
If search engines see it repeatedly on pages that should rank, those pages can be dropped from the index. Fix it quickly.