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.
John Mueller Hangout Transcript
John (Question)
So the first question I have on my list here is: it’s theoretically possible to have two different HTTP result codes on a page. But what will Google do with those two codes? Will Google even see that? And if yes, what will Google do, for example, a 503 plus a 302.
John (Answer)
So I wasn’t aware of this. But of course, with the HTTP result codes, you can include lots of different things. Google will look at the first HTTP result code, and essentially process that. And you can, theoretically, still have two HTTP result codes or more there, if they are redirects leading to some final page.
So for example, you could have a redirect from one, one page to another page, that’s one result code. And then on that other page, you could serve a different result code.
So that could be a 301 redirect to a 404 page, that’s kind of an example that happens every now and then. And from our point of view, in those kinds of chain situations where we can follow the redirect, to get a final result, we will essentially just focus on that final result.
And if that final result has content, then that’s something we might be able to use for canonicalization. If that final result is an error page, then it’s an error page. And that’s fine for us, too.