AI Summary: Return 404 or 410 when a resource is unavailable without a relevant replacement. Use 301 or 308 for a genuine permanent move and 302 or 307 for a temporary one. Test the final status, Location, chain, canonical, body, sitemap, and internal links; no status code guarantees indexing, ranking transfer, or AI citation.
Choose the response that describes reality
An HTTP status is a server-client contract. RFC 9110 defines HTTP as a request/response protocol whose status codes describe response semantics. [4]
Use 404 Not Found when a resource is unavailable, or 410 Gone when it is known to be permanently removed. Without a relevant replacement, a real 4xx is clearer than a generic page.
| Situation | Response | Reason |
|---|---|---|
| Missing or unknown URL | 404 | The resource is not available |
| Permanently removed, no replacement | 410 | The removal is intentional |
| Permanent replacement | 301 or 308 | The old URL moved |
| Temporary alternate location | 302 or 307 | The original may return |
| Server overload or failure | 429 or 5xx | The service needs recovery |
Google says 4xx content is not used for indexing, while a 2xx error page may become a soft 404. A successful status is not a substitute for truthful content. [1]
Redirect only to the closest replacement
Google treats 301 and 308 as permanent and 302 and 307 as temporary for Search. Use a server-side permanent redirect for a genuine move; use a temporary redirect while the original remains primary. [1] [2]
Before a migration, map each old URL to its closest new destination, update canonicals, internal links, and sitemaps, and keep redirects direct. Unrelated homepage redirects can confuse users and produce soft 404s. [3]
Avoid chains and loops. Prefer one hop to the final page over /old to /middle to /new.
Test the complete path
For each old URL, verify status, Location, hops, final status, canonical, body, and type. Confirm relevance, sitemap, and direct links.
Test unknown, deleted, temporary-maintenance, and failure routes. Review logs for loops and spikes in 404, 429, and 5xx responses.
A clean map clarifies URL state. It does not guarantee deindexing, ranking transfer, recovery, retrieval, or citation.
References
- Google Crawling Infrastructure: How HTTP status codes affect Google crawlers
- Google Search Central: Redirects and Google Search
- Google Search Central: How to move a site
- RFC 9110: HTTP Semantics