ARTICLE - SEO Growth & SaaS

404 and Redirect Mapping and Verification

Map each old URL to equivalent content during a migration. When no replacement exists, return a real error instead of sending everything to the homepage; verify responses and caches after launch.

2026-11-26 16IDC Original 7 views
Advertisement

After a site redesign, old links can still arrive from search results, bookmarks and external sites. Map each old URL to its corresponding new content first: use a permanent redirect for a permanent move to equivalent content, and return a real 404 or 410 when no appropriate replacement exists. Do not send all old addresses to the homepage just to eliminate an error report.

Build the URL Map

Collect old addresses from historical sitemaps, CMS exports, access logs, analytics and the Search Console links report. Prioritize review by business value, traffic and incoming links, but keep the long-tail inventory. Each source has blind spots; choose a log period that covers seasonal activity. Google's site migration documentation likewise recommends preparing a map and updating internal links.

Keep the complete old URL, including scheme, host, path and meaningful query parameters. Do not casually merge case, trailing slashes, encodings or language variants. Pagination and filters can change the content; tracking parameters may be discarded under an explicit rule. Verify target availability and content equivalence in a test environment before writing rules.

Old URL (illustrative) Target or disposition Expected status Parameters and verification
https://example.com/old-guide https://example.com/guides/start 301 Discard tracking parameters; target is the complete article
https://example.com/retired No replacement 410 Confirm permanent removal
https://example.com/pending Disposition undecided 404 Keep a pending record and revisit it

The actual map should also record an owner, deployment batch, launch date and verification result. A many-to-one mapping can be appropriate when merged content remains fully available on the new page. A merely related topic that does not satisfy the old page's intent is not an equivalent target. Record the target's canonical, indexing and access requirements; see website indexation.

Choose a Status Code by Resource Disposition

Old URL disposition decision Old URL Equivalent content? Choose redirect 404 or 410 Yes No Permanence and request method determine the redirect code
Figure 1: Old URL disposition decision (Source: illustrative check for equivalent content before choosing a redirect or error)
Status When to use it
301 Permanent move, chiefly for ordinary page GET requests. Some clients may change POST to GET.
308 Permanent move requiring preservation of method and body; verify relevant client compatibility first.
302 Temporary move; clients may change POST to GET.
307 Temporary move requiring preservation of method and body.
404 No resource currently exists, such as an undecided disposition or mistyped address; not necessarily permanent.
410 The resource is known to be permanently removed with no suitable replacement.

RFC 9110 defines these HTTP semantics. Google treats both 301 and 308 as permanent redirects for general web pages. Its handling of 404 and 410 does not promise immediate removal; previously indexed URLs are removed over time, as explained in Google's crawler status-code documentation (official sources checked on 2026-11-28). Browsers or intermediaries may cache redirects, so removing a rule may not immediately affect clients with a cached response. Verify targets before release rather than using permanent redirects for temporary experiments.

Deploy on the Server and Prepare Rollback

These are two exact-path Nginx examples for the old host's server block. Replace the host and paths with verified mappings. /old-guide redirects to a fixed new path and does not preserve the original query string; /retired returns 410 after confirmed permanent removal. Merge with an existing matching location rather than duplicating it. If parameters change page meaning, design and test a separate mapping; do not forward sensitive parameters unconditionally.

location = /old-guide {
    return 301 /guides/start;
}

location = /retired {
    return 410;
}

After the configuration is loaded, the first path should return 301 with a Location pointing to /guides/start, and the second should return 410. Verify the actual host and page content as well. The Nginx return documentation explains how a local URI becomes a complete redirect URL. Large rule sets may instead live in a CMS, proxy or CDN; check precedence so edge and origin do not redirect to each other.

With server configuration access, back up the configuration and current deployment and run this in the test environment first:

sudo nginx -t

Only after syntax and configuration tests succeed, run sudo nginx -s reload in the maintenance window. On failure, inspect the reported path and permissions; do not reload. Keep the prior configuration for rollback: restore it, run nginx -t again, reload and purge applicable CDN caches. A permanent redirect already cached in a browser may not be immediately reversible.

Post-Launch Verification and Soft 404s

Replace the example host and paths with test or production addresses you control. These commands use GET rather than HEAD: the first does not follow redirects, while the second displays headers for the entire chain.

curl -sS -D - -o /dev/null 'https://example.com/old-guide'
curl -sS -L --max-redirs 10 -D - -o /dev/null 'https://example.com/old-guide'
curl -sS -D - -o /dev/null 'https://example.com/retired'

The first should show 301 and the expected Location; the second should show each response and end with a successful response from the intended page; the third should return 410. For loops, a wrong host or a 404 target, inspect the rule order at the CDN, load balancer and origin. Retest with the appropriate identity if the target requires login. Directing old URLs to final targets reduces chains, but a correct status alone does not establish content equivalence.

A soft 404 occurs when a page appears to return success but a search engine considers it an error or lacking useful content. Redirecting many unrelated old URLs to the homepage can also trigger it. Check the Search Console page indexing report and actual response body; return 404/410 for genuinely removed content, or point moved content to its corresponding page. Verify every map row and important parameter variant, and monitor logs, search reports and traffic on old and new addresses. Update internal links, sitemaps and relevant canonical/hreflang annotations. Results depend on recrawling and indexing, not simply deploying a rule.

Limitations

  • The old host's DNS, TLS certificate and redirect service must remain available, or clients may fail before receiving a redirect. A cross-domain move may also require the Search Console change-of-address tool.
  • Caches, personalization, geography and permissions can yield different responses. One anonymous request does not represent every user. Do not represent a temporary service failure as permanent removal.
  • Validate targets, loops and parameters in a test environment before releasing large rule sets in batches. Automated HTTP checks do not replace human review of page content.

FAQ

Does every 404 need a redirect?

No. A typo, an address that never existed or a deleted page with no equivalent replacement can return a genuine 404. Use 410 when permanent removal is known. Map old URLs that still have corresponding content instead of sending unrelated intents to the homepage.

Does 410 remove a page from Google faster than 404?

There is no basis for promising that. Google's current documentation treats both as corresponding 4xx errors and removes previously indexed URLs over time; recrawl timing is not guaranteed. Choose the code based on whether permanent removal is known, not as an indexing-speed switch.

How do I fix a redirect chain after migration?

Point the old URL directly to the confirmed final page. First use requests with and without redirect following to record each status and Location. Identify intermediate redirects added by the CDN, proxy or origin, and check scheme, host and trailing-slash rules for loops after the change.

Related Providers

  • Cloudflare: when redirecting at the edge, check rule order against origin behavior.
  • WordPress: for CMS migrations, manage old addresses alongside permalink and server rules.

Community & Resources

Original source: 16IDC Original ↗