ERR_TOO_MANY_REDIRECTS nginx config_error ai_generated true

ERR_TOO_MANY_REDIRECTS: redirect loop

ID: nginx/http-to-https-loop

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
1 active

Root Cause

HTTP to HTTPS redirect creating infinite loop behind LB/proxy.

generic

Workarounds

  1. 92% success Check X-Forwarded-Proto header: if ( \!= "https") { return 301; }
  2. 88% success Configure real_ip_header and set_real_ip_from for proxy trust

Dead Ends

Common approaches that don't work:

  1. Remove HTTPS redirect 82% fail

    Traffic unencrypted

  2. Force scheme in redirect 78% fail

    Breaks behind reverse proxy