How to Fix Nginx 502 Bad Gateway in 5 Minutes
Your upstream is crashing and Nginx can't forward requests. Here's exactly how to diagnose and fix it.
Practical troubleshooting guides for WordPress, DNS, SSL, Cloudflare, Nginx, AWS, and infrastructure failures. Start with the symptom, not the guesswork.
Check your domain's health before diving into guides
Query A, AAAA, CNAME, MX, NS, TXT records from multiple locations
Try itVerify certificate validity, chain, expiry, and TLS protocol version
Try itTest any URL for status code, response time, and headers
Try itLook up domain registration, expiry, and nameserver information
Try itWhite screen, plugin conflicts, database connection errors, and update failures
Resolution failures, propagation delays, record misconfigurations
Certificate errors, mixed content, chain issues, protocol conflicts
CDN caching, proxy errors, WAF blocks, and DNS settings
502/504 errors, reverse proxy misconfig, upstream failures
ALB/NLB errors, Lambda timeouts, IAM permission denied, RDS issues
Connection refused, replication lag, disk full, slow queries
Domain changes, server moves, HTTPS migration, rollback
Your upstream is crashing and Nginx can't forward requests. Here's exactly how to diagnose and fix it.
Browsers trust your cert but users see privacy errors. The fix is usually one missing intermediate file.
No error message, just a blank page. Walk through memory, plugin, theme, and .htaccess checks in order.
Start with the exact browser error, dashboard failure, or outage pattern so you can narrow the first safe fix.
Check DNS resolution, certificate coverage, proxy status, and origin reachability before touching application code.
Retest the affected route after each update so you know what actually restored service.