Facebook Pixel

How do I fix the ERR_TOO_MANY_REDIRECTS error?

This is a redirect loop caused by both Nginx and Node.js redirecting HTTP to HTTPS. Fix by setting app.set('trust proxy', 1) in Express so it trusts the X-Forwarded-Proto header from Nginx and knows the request is already HTTPS.

Verify This Answer

Cross-check this information using these trusted sources:

More FAQs in Domain Verification and Troubleshooting Fixing DNS and SSL Issues

Check DNS with dig yourdomain.com A +short (should return your IP), check HTTPS with curl -I https://yourdomain.com (should return 200), check SSL with openssl s_client, check global propagation with dnschecker.org, and test the API with curl https://api.yourdomain.com/api/health.

Check if nameservers are updated at your registrar (dig yourdomain.com NS), verify the A record exists with the correct IP, flush local DNS cache, and wait for propagation (up to 24 hours). Use dnschecker.org to check global propagation.

Check certificate validity with sudo certbot certificates. Renew if expired with sudo certbot renew. Ensure Nginx is configured for SSL (sudo nginx -t). The domain must point to your server before running certbot. If using Cloudflare, use DNS-01 challenge or temporarily disable proxy.

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.