Docs Error Library Connection Errors Error 502: Bad Gateway

Error 502: Bad Gateway

What Is Causing This Error?

The ‘Error 502: bad gateway’ issue is a server-side error. It often occurs if your SMTP server has a temporary outage and is unreachable.

When you send an email from your site, the SMTP server you configured sends the request to your web hosting server. The server, in turn, returns the required credentials needed to authorize the email.

If your email service provider takes too long to respond to the server, it’ll lead to the ‘502: bad gateway’ error.

Resolving the Error – Solution

Since this is a server-side error, resolving it would require contacting your SMTP service provider or your web hosting provider. Once you’ve done that, we recommend sharing specific details about the error with them.

Often, it is a temporary timeout from your email service provider, which they’re most likely working to resolve. So, waiting and retrying after a while could resolve the issue on your site.

If you’d like to avoid such timeouts in the future, we recommend switching to a reliable email service provider such as SendLayer.

That’s it! Now you know the common causes of the ‘Error 502: bad gateway’ issue and how to resolve it.

If you’d like to learn how to use SendLayer to send your website emails, check out the following tutorials: