One SEO professional asked John Mueller during a hangout about HTTP result codes.
Their question is: it’s theoretically possible to have two different HTTP result codes on one page.
However, what will Google do with those two codes? Will Google even see this? And what will Google do, for example, with a 503 plus a 302.
John explained that he wasn’t aware of this, and answered that with the HTTP result codes, you can include lots of different things.
Google, however, will look at the first HTTP result code, and process that one. And then, you can theoretically still have two HTTP result codes or more there, if they are redirects leading to the final page.
For example, you could have a redirect from one page to another page, that’s one result code.
And then, on that other page, you could serve a different result code. So this could be a 301 redirect to a 404 page, that’s an example that happens every now and then.
And from Google’s perspective, in this kind of situation where there’s a chain that they can follow the redirect, to get a final result, Google will focus on that final result.
If that final result has content, then this is something Google might be able to use for canonicalization.
If the final result is an error page, then it’s an error page. And that’s fine for Google also.