Skip to the indexed answers
Digital Marketing Index

usdigitalmarketingindex.com SEO

How should a redirect map be prepared before migrating thousands of URLs?

As a table with one row for every old URL and a decision recorded in each row: the new URL that replaces it, or a deliberate statement that it is being retired. The map is built before launch from a complete inventory of the old site, each destination is chosen for being the closest equivalent in content, and the finished map is tested against the staging site before a single redirect goes live. Google’s site move guidance puts the requirement in a sentence: “It’s important to map your old site’s URLs to the URLs for the new site” (Google’s guidance on site moves with URL changes). At the scale of thousands of URLs the work combines rules for the patterns and individual decisions for the exceptions, and the map is the document that proves nothing was left to chance.

Inventorying legacy URLs

No single source lists every URL a site has. Combine several.

Source What it contributes
Crawl of the live site URLs reachable through links
XML sitemaps URLs the site declares; the guidance suggests looking there for the most important ones
Server logs URLs that are requested, including those no longer linked
Search Console: pages with clicks, and the Links report URLs that receive search traffic or links from other sites
Analytics landing pages URLs with visits
CMS database export Every published item, including orphans
Previous redirect rules Old URLs already redirecting, whose targets are about to change
Paid campaign and email destinations URLs used outside the site

Merge and de-duplicate. Then record for each URL the facts that inform its decision: current status code, page type, canonical, organic clicks over a year, external linking domains, and whether it is indexed.

Include more than pages. The guidance asks that site move plans cover embedded content: images, videos, JavaScript, and CSS files. PDFs and other downloads belong in the inventory too.

Normalize before mapping: one row per distinct URL, with decisions about trailing slashes, letter case, and protocol and host variants handled as rules, not as thousands of rows.

Selecting closest relevant destinations

For each old URL, one of a small set of outcomes.

Outcome When Response
Redirect to equivalent The same content exists at a new URL 301 to that URL
Redirect to consolidated page Several old pages were merged into one 301 to the merged page
Redirect to nearest parent The page is gone and a parent truly covers its subject 301, used sparingly, reviewed by hand
Retain The URL does not change None
Retire The content is gone and nothing replaces it 404 or 410

The guidance warns against the shortcut: “Don’t redirect many old URLs to one irrelevant single URL destination, such as the home page”, which it says might be treated as a soft 404 error. It allows consolidation explicitly: where content from multiple pages has been combined, the older URLs can redirect to the new single page.

Work in two layers.

Pattern rules cover the bulk. Where a whole section moves by a predictable transformation, one rule maps it.

/blog/2019/05/post-name/        ->  /articles/post-name/
/products/category/item-123/    ->  /shop/item-123/

Every rule is still expanded into rows and checked, since rules produce wrong answers at their edges: an item that was renamed, a category that was split.

Individual decisions cover everything the rules do not, in order of importance. Pages with the most organic clicks and external links are mapped by a person who opens both the old page and the proposed destination.

A redirect map schema:

Field Content
Old URL Full, normalized
Old status Current response code
Page type Template or section
Organic clicks, 12 months From Search Console
External linking domains From the Links report
Decision Redirect, consolidate, retain, retire
New URL Final destination; blank if retired
Response 301, 410, 404, or none
Rule or manual Which rule produced the row, or the name of the person who decided
Rationale Why this destination: same content, merged into, successor, no replacement
Validation: target status 200 expected; filled in from testing
Validation: hops 1 expected
Validation: content match Checked by sample or by hand for priority rows
Sign-off Owner and date

If the migration also renames paths, choose names that will not need changing again. What makes a slug hold up when its content is revised is covered in the guide to what makes a URL slug descriptive without making it fragile.

Testing mapping coverage

Test the map as data before testing it as redirects.

Check Method Pass condition
Coverage Compare the inventory with the map Every inventoried URL has a row
No blanks Filter rows with a redirect decision and no new URL None
Targets exist Request every new URL on staging 200
Targets are final Check whether any new URL is itself an old URL in the map None; no chains
No loops Check whether any row's target redirects back to its source None
One-to-one sanity Count rows per target Targets receiving very many sources are reviewed
Home page concentration Count rows whose target is the home page Only the old home page and its variants
Canonical agreement Compare each target with the canonical it declares Equal
Priority rows Open old and new for the highest-traffic and most-linked URLs Content equivalent
Sample of the rest Random sample from each pattern rule Content equivalent

Then test the redirects themselves on staging: request each old URL, record the status, the location, the number of hops, and the final status. The guidance says to redirect to the final destination directly and, where a chain cannot be avoided, to keep it low, “ideally no more than 3 and fewer than 5”.

Run the full test again immediately after launch, against production.

A redirect map covers requests for old addresses. The canonical link elements on the new pages have to change with the URLs as well, as set out in the guide to which canonical link elements must change when page URLs are migrated.

Identifying exceptions

Certain URL types fall outside the pattern rules and need named handling.

Exception Handling
URLs with query parameters Decide per parameter: carry over, strip, or map
Paginated URLs Map to the equivalent page of the new listing, or to its first page if pagination differs
Old redirects Update their targets to the new final URLs, so old chains do not lengthen
Media files Map image and document URLs; they have their own links and search visibility
Language versions Map each to its counterpart in the same language
Case and encoding variants A rule that normalizes before matching
Pages with no successor Marked retired, with a reason
Pages merged Each source row names the same target; the target carries the merged content
Legal and compliance pages Confirm with the owner
URLs in printed material or apps Kept working indefinitely

Retirement is a legitimate outcome and should be visible. A row that says “retire, 410, product line discontinued, no equivalent” is a decision. A row that redirects the same URL to the home page hides the absence of one.

Keep the map after launch. It is the reference for updating internal links, for diagnosing traffic changes page by page, and for the day someone asks why an old address leads where it does. The guidance says to keep redirects “for as long as possible, generally at least 1 year”.

When the migration also changes the domain, the map is joined by steps specific to that case, described in the guide to how a domain migration can preserve organic value from backlinks to the old domain.

The rule: every old URL gets a row, every row gets a decision with a reason, and every decision is tested before launch and again after.

Link trail

Reader comments on this answer

Add your comment to this answer

Your email address will not be published. Required fields are marked *