🌐Internal server error (500)
500 Internal Server Error
Something went wrong while the server (backend) was running your code, so it stopped. Usually the cause is server-side code or settings, not the screen.
🤔 Why does it happen?
- The server code hit an error (for example, it read a value that doesn't exist, or there's a typo)
- Environment variables (API keys, database address) are missing on the deployed site
- Connecting to the database or an outside API failed
🔧 Try this
- The real cause shows up in the server logs, not in the browser (on Vercel: your project → Logs)
- If it works on your computer but not on the deployed site, check the environment variables first
- Copy the error message from the logs exactly as it is and show it to the AI
🤖 Ask your AI like this
On my deployed site, I get 500 Internal Server Error when I [do what]. The server logs are below. Please find the cause and fix it, and tell me what to look for in the logs if this happens again. [Paste the server logs here]
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Page not found (404)
404 Not Found - Authentication failed (401)
401 Unauthorized - No permission (403)
403 Forbidden - Too many requests (429)
429 Too Many Requests - CORS error (cross-site request blocked)
blocked by CORS policy - Couldn't send the request (Failed to fetch)
TypeError: Failed to fetch - Connection refused (localhost refused to connect)
ERR_CONNECTION_REFUSED - Mixed content (http request on an https page)
Mixed Content - Request method not allowed (405)
405 Method Not Allowed - What you sent is too big (413)
413 Payload Too Large - The middle server got no answer (502)
502 Bad Gateway - Service temporarily unavailable (503)
503 Service Unavailable - Redirects loop forever (too many redirects)
ERR_TOO_MANY_REDIRECTS - Blocked by an ad blocker
net::ERR_BLOCKED_BY_CLIENT - An image or file won't load
Failed to load resource: 404 (Not Found)