Not too long ago, Google’s John Mueller posted about what to do in case your site goes offline. The recommendation was to serve a 503 server standing code if the outage is brief time period. So somebody requested if they will serve a 502 server standing code as an alternative. John Mueller mentioned you should not.
John was requested on Twitter “does 502 error work as properly or it’s required to be 503 solely ? I wish to test as a result of internet hosting corporations throw totally different error codes in several instances.”
John responded on Twitter “502 just isn’t the identical as a 503 — I would advocate utilizing the correct consequence code. These durations aren’t documented in absolute phrases since they will change & range.” He gave this analogy, “If a bus is briefly delayed for an unknown time, how lengthy do you wait till you search for one thing else?”
The HyperText Switch Protocol (HTTP) 502 Unhealthy Gateway server error response code signifies that the server, whereas performing as a gateway or proxy, acquired an invalid response from the upstream server.
So keep on with the appropriate server standing response code for the appropriate state of affairs.
Discussion board dialogue at Twitter.