When a docs page moves, return a permanent redirect to its new home. When it is gone with no replacement, return 404 or 410. Avoid pages that show "not found" text with a 200 status, because Google may treat them as soft 404s.
What Google says about each code
Google's documentation on HTTP status codes states:
- 301 and 308 are a strong signal that the redirect target should be processed.
- 302, 303 and 307 are a weak signal. Google follows them but treats the target as less definitive.
- Google ignores content returned by the redirecting URL and processes the final target.
- 4xx errors, except 429, are treated the same way: the content does not exist. Indexed URLs returning them are removed from the index, and crawl frequency for them gradually drops.
- 5xx errors make Google slow crawling temporarily. Indexed URLs are kept for a time but eventually dropped if the errors persist.
- A 2xx status does not guarantee indexing.
When you restructure docs
- List old and new URLs in a mapping file.
- Redirect each old URL to the single most relevant new page with a 301.
- Do not redirect everything to the home page. A redirect should go to equivalent content, and a mass redirect to the top is a poor reader experience.
- Update internal links and the sitemap to the new URLs. Google notes sitemap URLs are canonical candidates.
- Keep redirects in place for a long time. Readers still hold old links in bookmarks and issue trackers.
Pages with no replacement
Return 404 or 410. Google treats 4xx the same, so choose by clarity. Add a helpful custom error page with search and a link to the docs index, and make sure it really returns the error code.
The soft 404 trap
A page can return 200 yet show an empty page or an error message. Google may consider it a soft 404, and Search Console reports it as an error. This is common in single page apps. See JavaScript docs site crawlability.
Avoid redirect chains
Point old URLs straight at the final target. Chains add latency and make auditing harder. After a migration, crawl your own site and fix any link that still hits a redirect.
Temporary versus permanent
Use 302 or 307 only when the move really is temporary, such as a maintenance page. Using them for permanent moves sends a weaker signal.
Quick check
Is 410 faster than 404 for removal?
Google's documentation says it treats 4xx errors the same way, so I would not expect a difference in how Google handles them.
Should I redirect all deleted pages to the docs home?
No. Redirect to equivalent content when it exists, and otherwise return a true 404 or 410.
Sources
- HTTP status codes and network errors, Google Search Central
- Consolidate duplicate URLs, Google Search Central
Last reviewed: 19 October 2026.