Sendgrid and Bad Gateway Error

I’ve set up Django, CF and Sendgrid and am utilizing Digital Ocean. I verified I have the correct API Key in my settings. On the CF firewall I am currently only allowing my IP and one other as Inbound Rule and Blocking All Others for testing. Could this be the reason I am getting a 502 Bad Gateway Error when trying to send through my Contact page? Do I need to open up port 465 on the CF firewall?

Cloudflare won’t proxy Port 465 unless you’re using Spectrum for Enterprise on a special hostname.

The 502/504 errors are caused by a problem connecting to an upstream server - meaning your server is trying to initiate a process and this fails to work as expected or times out. In most cases of 502 / 504 errors, back-end servers are not communicating correctly. When this happens, you will see color page with Cloudflare branding and the Error 502 Bad Gateway or Error 504 Gateway Timeout. Review this Community Tip for fixing 502 or 504 gateway errors.

1 Like

Thank you I’ll check it out.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.