During the Q&A portion of a Google Office Hours hangout, John Mueller answered a question about 301 redirects.
An SEO professional asked about using 301 redirects. They explained that their dev team does not like to use 301 redirects and would rather use 302 redirects.
The reason for this is because 301s are stored in browsers potentially forever. Their team explained that in the case of a misconfigured redirect, people may not ever be able to lose an incorrectly processed 301 redirect.
Their main question is: how do 301 redirects work on Google as opposed to browsers?
The second part of their question involved cache control headers. Can they get the best of both worlds by using both?
John explained that the entire crawling and indexing system is different from browsers. They are optimized for different things.
For example, when it comes to a browser, it would make more sense to cache things for longer periods of time.
From Google’s point of view, on the crawling and indexing side, they have different methods and different things they have to optimize for.
Therefore, they do not treat crawling and indexing in the same manner that a browser normally does.
He expounded that it is a bit weird, though with their processes in place: they tend to render pages in exactly the same way as a browser. However, the entire process of indexing content in their systems is very different compared to what a browser would do.
One example of this is when a page is getting rendered and it uses extremely outdated JavaScript files, simply because the Google cache was able to store them for a little while.
On a browser, this behavior won’t happen. But that’s where it’s different.
John also added that yes, they can use 301 redirects with cache control so they can get the best of both worlds in terms of cache processing.
He explained that it doesn’t matter which type of cache headers you add on top of the 301 redirect.
If it’s a solution that works well for both you and your dev team, then why not use it? He thinks it’s a fine solution to do so.
This happens at approximately the 22:09 mark in the video.
John Mueller Hangout Transcript
John 22:09
Let me jump to some of the submitted questions. And I’ll get to all of you with raised hands as well later on. But just to make sure that the submitted questions also get covered a little bit. Let’s see a question regarding 301. Redirects and cache control headers.
I know I should use 301 permanent redirects in order to pass PageRank, the best and fastest way possible. However, our dev team doesn’t like to implement 301s, mainly because they’re stored in browsers possibly forever. They say in case of a misconfigured redirect, people might not ever be able to lose the incorrect 301 redirect.
So, the first question is: Does Google Store 301 redirects just the same as browsers seem to do?
John 22:57
The whole crawling and indexing system is essentially different from browsers in the sense that all of the the network side of things, they’re optimized for different things. So in a browser, it makes a lot more sense to cache things, cache things longer. But essentially, from our point of view, on the crawling and indexing side, we have different ways of…or different things we need to optimize for. So we don’t treat crawling and indexing the same as a browser.
It’s a bit weird in the sense that we render pages like a browser. But the whole process of getting the content into our systems is very different. And you see this sometimes when you render a page, or when you see a page getting rendered, and it uses really old JavaScript files, just because we’ve been able to cache them for a while, which maybe on a browser wouldn’t happen. But essentially, it’s different.
So the second question is, “will Google accept 301 redirects with cache-control no-cache, or a time in the headers in order for us to get the best of both worlds?”
Yes, that’s perfectly fine. If it’s a 301 redirect, we treat it as a 301 redirect. It doesn’t matter what kind of cache headers you also add on top of that. So from that point of view, if this is a solution that works well for your dev team and for yourself, why not? I think that’s perfectly fine.
The other thing is 302 redirects might also be an option if that works better for your dev team. 302 redirects have a bad reputation among SEOs, which I think is incorrect. Because they do work the same as normal redirects as well. It’s not that they don’t pass any PageRank or anything like that. And if you have 302 redirects for the long run, we treat them exactly the same as 301 redirects anyway. So if you can’t work out how it works with 301 redirects, maybe 302 redirects would be an option too.