During the English Google SEO Office-Hours From October 8, 2021, Search Advocate John Mueller addressed a question on the topic of backlinks and 404 pages.
The video below is queued to the 13-minute, 6-second mark, which is when the discussion (and eventual question) begins.
Basically, Kaixi has a site that has incoming links. Due to the changing nature of his content, the pages that these links point to sometimes don’t have content, which makes them blank pages (404s).
So, should he redirect these pages (which were category pages) to their parent categories? Should he do so with a permanent redirect, or just a temporary one? (Because possibly, those 404 pages may, in the future, have content again.)
John had a full response that I’d like to break down:
“If we see this happening at a larger scale, that you redirect kind of to the parent level, we would probably see that as a soft 404 and we would say, ‘Well the old page is gone and…instead of a 404 code, you’re redirecting, and maybe that’s better for users.
“But we see it as a 404, so from a practical point of view, I suspect there’s little SEO difference if you redirect or not.
301 or 302 May Not Matter (In This Case)
“If it makes sense from a user point of view to redirect, then I would just go for it–it’s not that you have a penalty either way, so that’s…the first thing. With regards to 301 or 302, I don’t think it matters there, because we would either see this as a soft 404 or we would see it as a canonicalization question.”
So, in short, do what’s best for your users, because from an SEO perspective, it probably doesn’t matter whether you do a 301 or 302 (permanent and temporary redirects, respectively).
“If it’s a soft 404, then the code doesn’t matter. If it’s a canonicalization question, then it comes down to which URL we show in the search results, and usually the higher-level one will have stronger signals anyway, and we will focus on the higher level.”
I think that “the code doesn’t matter” refers to 301 or 302.
If you’d like to use a canonical, then I think it would make sense to refer to another page you felt was appropriate for the search engines to index.