The 502 bad gateway status code error belongs to the 5xx category of HTTP status codes. All 5xx status codes indicate a server error, meaning the problem is within the location where the website is hosted from. Google will de-index pages with a 502 within days. Some server access may be needed to fix these problems.
When Would You See 502 Bad Gateway?
Users will come across a 502 bad gateway, often seen as a simple browser message, if the web server received an invalid response from the upstream server it accessed while attempting to fulfill the client’s request. Essentially, a user tried to load a page, but the browser displayed an error message because it was unable to retrieve or build the page from the server.
It differs from a 500 error as it specifically refers to an error related to a secondary server. Perhaps proxy or CDN.
502 error and search engine optimisation
As with any 5xx status code, a 502 error it means your page or even website as a whole cannot de displayed to customers. Getting it fixed should be a priority.
Google states that pages with a 502 error will cause a slowdown of the crawling rate in proportion to the number of errors found and pages are marked for removal from the Google index. That can happen within days.
What Causes 502 Bad Gateway?
- Server overload
- Firewalls
- Network errors
- Server software timeouts
- Content Delivery Networks
- Proxies
In general, a 502 should be sent when the web server has problems with a downstream server. Fixing the server is going to require an admin to take a look at logs and perform network tests in the server in order to determine and fix the problem.
What Does Gateway Timeout Mean?
Time is of the essence, even in the world of HTTP status codes. A gateway timeout quite literally means the client did not receive a timely response from the server.
Think of it as ordering a taxi but it didn’t show up, so you decided to walk instead. The client (browser) has attempted to load the page from the server, but it’s taken so long that it has said ‘not good enough, sorry’ and generated a gateway timeout error instead.
Website owners need to take gateway timeouts seriously because performance affects user retention. If it’s at the stage where your users are getting a gateway timeout message, this is even worse and certainly not good for your SEO. So, work on addressing the issues to ensure fast, reliable connectivity.
How to fix a bad gateway
As a user there isn’t much that can be done. In the first instance, try refreshing the page. Although the bad gateway is usually out of the user’s control, sometimes enough time has elapsed in between the error occurring and you refreshing it to have been fixed.
You can also try opening up the page in another browser or clearing your browser’s cache. Clearing your cookies is another idea, though isn’t always as popular due to the slight hassle this can create for logging into websites. Sometimes it’s necessary though, especially if it’s been a while since it was last done or you’ve noticed other problems when browsing the internet.
Pasting the URL into Down Detector can also shed some light on whether it’s just you having the issue or everyone else.
If it’s your own website that has the 502 bad gateway message, then paste the URL into Google Console to see if you can identify any errors. Sometimes the issue can be with your domain provider or web host, so you may need to contact them, or the server administrator to get it resolved.
To Sum Up
With a 502 bad gateway status code, the clue is in the name. When users come across this as they are browsing your website, they are likely to make a hasty exit. Google will mark these pages for de-indexing and that can happen within days.
Usually, the source of the problem lies within your web host, as all 5xx status code errors are server orientated. So, take swift action if you notice it on your website.