HTTP 502 Bad Gateway
Returned by a CDN, load balancer or reverse proxy (such as Cloudflare or NGINX) when the upstream origin server crashes, resets the connection or emits an invalid HTTP response.
Verified
Syntax / Example
HTTP/2 502 Bad Gateway server: cloudflare
Verify On A Live URL
curl -sI https://example.com/ | head -n 5
Documented Facts For HTTP 502 Bad Gateway
| Metric or Rule | Documented Value | Source |
|---|---|---|
| RFC 9110 definition | Invalid response from inbound upstream server (§15.6.3) | RFC 9110: HTTP SemanticsChecked November 25, 2026 |
| Google Search handling | Reduces crawl rate; drops URL if persistent | Google: HTTP Status Codes & SearchChecked November 25, 2026 |
| Common 2026 trigger | Unthrottled AI scraper spikes exhausting origin workers | Cloudflare Radar 2025 Year in ReviewChecked November 25, 2026 |
Official Specification & Google Behavior
Defined in RFC 9110 §15.6.3. Google treats 502 identically to other 5xx server errors: throttling crawl capacity proportional to error rate and dropping URLs if persistent.
SEO & Indexing Impact
Origin crashes during migration cutovers or AI scraper bursts trigger cascading 502 errors that lower Googlebot's crawl limit and block live AI citation fetches.
Backlink Monitoring Verdict
Usually an upstream origin or reverse-proxy outage rather than deleted content—retry across 24–48 hours before marking a backlink dead.
Common Pitfalls
- Failing to serve static/cached HTML at the CDN edge so bot traffic overwhelms SSR Node/PHP workers into 502s.
- Missing origin-health alerts during DNS or reverse-proxy migrations.
Frequently Asked Questions
- What is the difference between HTTP 500 and HTTP 502?
- HTTP 500 originates inside your application server, whereas HTTP 502 comes from a gateway, CDN or reverse proxy that failed to get a valid response from your upstream origin.
- How does Googlebot react to HTTP 502 errors?
- Googlebot reduces its crawl rate automatically to avoid overloading your server and eventually de-indexes URLs that persistently fail.
- How do static edge caches prevent SEO 502 spikes?
- Serving public HTML pages statically from CDN edge nodes isolates Googlebot and AI crawlers from origin server restarts or traffic spikes.
Primary Sources
Verified
- RFC 9110: HTTP SemanticsNovember 25, 2026
- Google: HTTP Status Codes & SearchNovember 25, 2026
- Cloudflare Radar 2025 Year in ReviewNovember 25, 2026
Related Research Guides
- October 9, 20269 HTTP Status Codes That Impact SEO And Backlinks: RFC 9110 VerdictsNine HTTP status codes (200, 301, 302, 308, 403, 404, 410, 429, 503) explained with RFC 9110 rules, Googlebot crawl handling and backlink verdicts.
- November 27, 2026Log File Analysis For SEO And AI Crawlers: Tools, Commands And Bot Audits In 2026GA4 sees 0% of Googlebot or AI bots. Compare Screaming Frog Log File Analyser (£99/yr, 1,000 lines free) plus awk/grep commands for 403 & bot audits.
- November 27, 2026AI Scraper Economics And Crawl-To-Click Ratios: Cloudflare Data, WAF Enforcement And PolicyCloudflare logged 38,066:1 crawl-to-refer for Anthropic, 1,091:1 for OpenAI and 195:1 for Perplexity vs 5.4:1 Googlebot. Publisher policy math.