Skip to main content
Home/Blog/How do I handle redirects during site migrations?
Technical SEO

How do I handle redirects during site migrations?

Learn the best practices and strategic approach for implementing redirects during website migrations to preserve SEO and user experience.

By Inventive HQ Team•
How do I handle redirects during site migrations?

To handle redirects during a site migration, crawl and inventory existing URLs, map moved pages to relevant new destinations, decide whether consolidated or retired pages should redirect or return a 410, implement permanent 301 redirects in a single hop, update your internal links to point at the new URLs directly, keep redirects in place for at least a year, and monitor Search Console and server logs for 404s. Relevant permanent redirects help search engines transfer ranking signals to the new structure and send visitors to useful pages.

That is the short version. The sequencing and judgment calls need more care: which pages to map by hand versus by rule, why an irrelevant homepage redirect may be unhelpful, how to flatten any chains that appear, and what to watch after cutover. Our redirect status-code guide covers the choice among 301, 302, 307, and 308; this article walks through the migration process.

The migration redirect playbook at a glance

A migration benefits from an ordered plan. Deploying the new site before redirects are ready, or removing the old domain while old URLs still receive requests, can lead to avoidable errors and traffic loss.

#Migration stepRedirect actionWhy it matters
1Inventory old URLsCombine a crawl with Search Console, analytics, server logs, sitemaps, and backlink dataA crawl may miss orphaned URLs; other sources can reveal URLs that still need handling
2Map destinationsMatch moved URLs to relevant new pages; use a relevant consolidated page where appropriate, or mark truly retired pages for 410Relevant destinations help visitors; irrelevant homepage redirects may be treated as soft 404s
3Use 301 permanentImplement permanent moves as 301s, not temporary 302/307s301 signals a permanent move; temporary codes do not send that signal
4One hop, no chainsWhere possible, point redirecting URLs directly at their final live URLs (A → C instead of A → B → C)Chains add latency and can complicate crawling and debugging
5Cut over & verifyDeploy redirects first, test them, then point DNS; keep a rollback planAn untested cutover can 404 the whole site during peak indexing
6Update internal linksRewrite your own links, nav, sitemaps, and canonicals to the new URLsInternal links should hit the destination in zero hops, not via a redirect
7Keep redirects long-termKeep useful redirects as long as practical, generally at least one year; review visits and backlinks before retiring anyBacklinks and bookmarks may continue sending requests to old URLs
8Monitor 404sWatch Search Console + server logs until the move stabilizes; submit the new sitemap and, for a domain or subdomain move other than a www-to-non-www move (or the reverse) on the same domain, use Search Console's Change of Address toolCatches broken redirects, chains, and loops that need attention
Site migration redirect flow A request to an old URL is caught by a 301 redirect and sent in a single hop to the matching new URL, which returns a 200 OK, while a chain of stacked redirects is shown as the pattern to avoid. One hop, not a chain: how a migration request should resolve

DO — single 301 hop Old URL /old-page

301 New URL /new-page 200 OK

AVOID — redirect chain /old-page 301 /temp-page 301 /new-page wasted hops

The rest of this guide walks each step in depth — but if you remember only one rule, make it this: each moved URL should redirect directly to a relevant live page; a genuinely retired page without a suitable destination can return 410 instead.

Managing Redirects During Website Migrations

Site migrations represent some of the most challenging situations in web management. Moving to new infrastructure, changing domain names, restructuring URL hierarchies, or switching content management systems can require careful redirect planning. Improperly executed migrations can reduce search visibility and confuse users. Well-planned redirects help visitors and search engines find relevant pages at the new URLs, though rankings may still fluctuate during the move.

A strategic approach to migration redirects requires understanding your current URL landscape, planning the destination structure meticulously, implementing redirects systematically, and monitoring the transition carefully. The goal is making the migration essentially invisible to users and search engines—they should seamlessly follow redirects to the new location without realizing anything changed.

Pre-Migration Planning and Audit

Audit Your Current URL Structure

Before implementing any redirects, thoroughly understand your existing site:

Inventory Current Pages:

  • Combine a site crawl with Search Console, analytics, server logs, sitemaps, and backlink data; any one source may miss some old URLs
  • Note current URL structure and patterns
  • Identify parameter usage (tracking parameters, session IDs, etc.)
  • Document any special redirects already in place

Identify High-Value Pages:

  • Pages with most organic traffic
  • Pages with most backlinks
  • Pages ranking for important keywords
  • Pages with high conversion rates

These are where migration mistakes hurt most. They deserve extra care.

Find Duplicate Content:

  • Identify multiple URLs with identical content
  • Plan consolidation (which URL should be canonical?)
  • Remove unnecessary versions post-migration

Categorize URLs by Type:

  • Homepage
  • Service/Product pages
  • Blog posts
  • Category/Archive pages
  • Special pages (about, contact, etc.)
  • Old or outdated pages (candidates for removal)

Document Your Redirect Mapping

Create a comprehensive mapping document showing where each URL will go:

Spreadsheet Template:

Old URLNew URLRedirect TypePriorityNotes
/old-product/new-product301HighTop traffic page
/article-2020/blog/updated-article301MediumOutdated article
/store/shop301HighMain category

This document becomes your implementation blueprint and post-migration reference.

Choosing Redirect Strategy

Strategy 1: One-to-One URL Mapping

Approach: Each old URL redirects to a specific new URL

/old-page → /new-page
/old-product → /new-product
/old-service → /new-service

Best For:

  • Similar URL structures in old and new
  • Straightforward migrations (same CMS, same domain)
  • Mapping individual pages to close replacements
  • Content that's been updated rather than reorganized

Pros:

  • Sends visitors and search engines to the closest matching pages; rankings can still change after a move
  • Maintains granular tracking of page-level migration
  • Users land on exact content they sought

Cons:

  • Requires creating many redirect rules
  • Time-consuming mapping and implementation
  • Difficult to manage if URL structure changes significantly
  • Might create hundreds or thousands of redirects

Strategy 2: Category-Level Consolidation

Approach: Group old URLs into broader categories

/product/old-item-1 → /products
/product/old-item-2 → /products
/product/old-item-3 → /products

Best For:

  • Consolidating outdated products/services
  • Significant restructuring
  • Removing pages that shouldn't exist post-migration

Pros:

  • Fewer redirect rules to maintain
  • Cleaner new structure
  • Useful when consolidating duplicate content

Cons:

  • Users might not find exact product/page
  • A broad category may be less relevant than a close replacement for some old pages, which can affect search results
  • Less precise tracking

Google says 301 and other permanent redirects do not cause PageRank loss. Choose a category destination when it is a relevant replacement for the old content; changes to content and destination relevance can still affect search results.

Strategy 3: Hybrid Approach

Approach: One-to-one for important pages, category-level for others

/services/consulting → /consulting-services (high-traffic, one-to-one)
/services/old-product-1 → /services (low-traffic, category redirect)
/services/old-product-2 → /services (low-traffic, category redirect)

Best For: Most real-world migrations

Pros:

  • Balances preservation and simplicity
  • Gives high-traffic pages close replacements while simplifying other redirects
  • Flexible approach

Implementation Timing and Phases

Phase 1: Pre-Migration (4-6 weeks before)

Immediate Actions:

  1. Finalize URL mapping document
  2. Create new site structure
  3. Develop all content for new site
  4. Set up new hosting/infrastructure if needed
  5. Test thoroughly before migrating live

Migration Announcement:

  • Internal team communication
  • Document the timeline
  • Identify responsible parties for each component

Phase 2: Migration Cutover (1-2 days)

The Big Day:

  1. Implement the planned 301 redirects on the old site
  2. Deploy new site on new URL structure
  3. Point DNS to new location (if changing domains)
  4. Monitor for issues throughout the day
  5. Have rollback plan ready if critical issues occur

Timing Considerations:

  • Perform migration during off-peak hours
  • Avoid launching before weekends (limited support)
  • Avoid launching before major holidays
  • Schedule maintenance windows if possible

What NOT to Do:

  • Don't launch new site before redirects are tested
  • Don't assume redirects work without verification
  • Don't launch during peak traffic hours
  • Don't migrate without having a rollback plan

Phase 3: Post-Migration Monitoring (Weeks 1-8)

Week 1: Critical Monitoring:

  • Monitor server error logs for 404 errors
  • Check the Search Console Page indexing report for unexpected indexing and 404 issues
  • Verify all high-priority pages are accessible
  • Monitor traffic for unexpected drops
  • Check user feedback for issues

Weeks 2-4: Transition Period:

  • Submit updated sitemap to Google Search Console
  • Monitor rankings for key pages
  • Check that Google is crawling new URLs
  • Verify redirects processing correctly
  • Address any issues found

Weeks 4-8: Review Progress:

  • Monitor index migration; it may continue beyond this period, especially after a domain move
  • Check whether rankings are stabilizing without assuming a fixed recovery date
  • Review any temporary redirects and replace them with permanent redirects if the move is permanent
  • Document lessons learned

Continue monitoring after week 8 if crawling, indexing, or traffic has not stabilized.

Implementing Redirects Correctly

Server-Level Implementation

Apache (.htaccess):

RewriteEngine On
# Specific old URLs must be handled before the broad host rule
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com$
RewriteRule ^old-page$ https://new-domain.com/new-page [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com$
RewriteRule ^old-product$ https://new-domain.com/new-product [R=301,L]

RewriteCond %{HTTP_HOST} ^old-domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.old-domain\.com$
RewriteRule ^(.*)$ https://new-domain.com/$1 [R=301,L]

Nginx:

server {
    listen 80;
    listen 443 ssl;
    server_name old-domain.com www.old-domain.com;
    ssl_certificate /etc/nginx/certs/old-domain-fullchain.pem;
    ssl_certificate_key /etc/nginx/certs/old-domain-privkey.pem;

    location = /old-page {
        return 301 https://new-domain.com/new-page;
    }

    location / {
        return 301 https://new-domain.com$request_uri;
    }
}

Replace the certificate paths with files for a valid certificate covering both old hostnames. Keep the old domain's HTTP and HTTPS endpoints available so requests to either scheme reach these redirects. See Nginx's HTTPS server configuration for certificate setup.

Using PHP for Dynamic Redirects

If migration involves changing URL parameters or structure:

<?php
// Redirect old URL structure to new
if (isset($_GET['id'])) {
    $id = $_GET['id'];
    // Look up where this ID maps in new structure
    $new_url = lookup_new_url($id);
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: ' . $new_url);
    exit;
}
?>

Using CDN Redirects

If using Cloudflare or similar CDN:

Cloudflare Rules:

URL: domain.com/old-page
Redirect to: https://domain.com/new-page
Status code: 301

Cloudflare allows bulk import of redirects via CSV for large migrations.

Handling Special Migration Scenarios

Scenario: Domain Migration

Old: example.com → New: newexample.com

Implementation:

HTTP or Server: Redirect all HTTP requests to HTTPS
Domain Redirect: Redirect all requests from old domain to new domain
Example: 301 https://example.com/* → https://newexample.com/*

Considerations:

  • Keep old domain active and redirecting for at least 1-2 years
  • Update DNS records carefully (both sites might be in DNS temporarily)
  • Ensure SSL certificates valid for both domains during transition
  • After redirects are working, submit a Change of Address in Search Console for the verified old domain or subdomain properties. Follow Google's current guidance for applicable moves and verified variants; this tool is not needed for path-only, HTTP-to-HTTPS, or www-to-non-www moves (or the reverse) on the same domain.

Scenario: URL Structure Reorganization

Old: /category/item → New: /items/category/item

Implementation:

  • Map individual old URLs to new structure
  • Can use regex rewrite rules if structure is predictable:
RewriteRule ^category/([a-z-]+)$ /items/category/$1 [R=301,L]

Scenario: CMS Migration

Old: Static site → New: WordPress/Drupal/etc.

Considerations:

  • CMS may have its own URL structure requirements
  • Consider 301-redirecting old URLs to CMS-friendly structure
  • Some CMSs have built-in redirect management tools

Scenario: HTTPS Migration

Old: HTTP site → New: HTTPS site

Implementation:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Considerations:

  • Install valid SSL certificate before migration
  • Redirect both old domain AND HTTP/HTTPS variations

Monitoring the Migration

Google Search Console

Critical Checks:

  1. Ensure new domain/property created in GSC
  2. For a domain or subdomain move other than a www-to-non-www move (or the reverse) on the same domain, use Change of Address on the verified old property after redirects are working; check Google's current guidance for the applicable properties and variants
  3. Upload new sitemap
  4. Monitor the Page indexing report for unexpected 404s and other indexing issues
  5. Compare indexed pages with expected canonical URLs and inspect specific URLs as needed
  6. Check "URL Inspection" for specific pages
  7. Monitor "Core Web Vitals" for performance impact

Expected Timeline:

  • Crawling and indexing begin as search engines discover the new URLs
  • Pages move through the index at different rates
  • Ranking fluctuations can continue while the move is processed
  • A domain move or larger site may take longer; there is no fixed completion date

Server Log Analysis

What to Monitor:

  • 404 errors (broken redirects, missing pages)
  • 301 response codes (verify redirects working)
  • 500 errors (server issues)
  • Request volume changes (unexpected drops)
  • Referrer patterns (tracking user behavior)

Tools:

  • Analyze raw logs with command-line (grep, awk)
  • Use log analysis services (Splunk, ELK)
  • Platform analytics (Google Analytics, Hotjar)

Traffic Monitoring

Expected Patterns:

  • Traffic may fluctuate during the move
  • Old-domain traffic should shift toward the new domain as redirects and indexing take effect
  • Recovery varies with site size, crawl rate, and changes to content or structure

Warning Signs:

  • Sustained or worsening traffic losses that warrant investigation
  • Specific pages losing traffic significantly
  • Bouncing between old and new domains
  • 404 errors increasing instead of decreasing

Post-Migration Cleanup

When to Remove Redirects

Timeline:

  • Keep migration redirects as long as practical, generally at least one year
  • Review old-URL visits and backlinks before considering removal
  • Keep or update redirects when a relevant live destination exists; do not leave a redirect pointing to a broken page

How to Remove:

  • Check visits, backlinks, and destination relevance before retiring a rule
  • If a page is truly gone with no suitable replacement, configure the server to return a 404 or 410 response

Post-Migration:

  • Search for all old URLs in content
  • Update internal links to point to new URLs
  • Reduces redirect chains (improves performance)
  • Can improve crawl efficiency

Tools:

  • Find & Replace in CMS
  • Custom scripts searching and updating
  • Automated tools for link fixing

Monitoring Ongoing

Ongoing Checks:

  • Monitor error logs monthly
  • Check GSC quarterly
  • Update redirect rules as needed
  • Plan redirect removal timeline

Common Migration Mistakes

1. Not Testing Redirects Before Deployment

2. Wrong Redirect Type (302 Instead of 301)

  • Use 301 for permanent moves
  • Temporary 302s send the wrong permanence signal for a lasting move
  • Use a permanent redirect if the move will not be reversed
  • If you are unsure which code applies, see 301 vs 302 vs 307 vs 308

3. Redirect Chains

  • URL1 → URL2 → URL3 (bad)
  • Update to URL1 → URL3 directly (good)
  • Reduces crawl budget waste and improves performance

Chains can arise when new redirects are stacked on top of existing ones. Check the old URL list before and after cutover to find chains and loops:

Redirect Chain Checker

Trace HTTP redirect chains and analyze response headers for debugging

Open the full Redirect Chain Checker tool →
Loading interactive tool...

4. Not Keeping Old Domain Active

  • Removing old domain too quickly
  • Keep redirecting as long as practical, generally at least one year, and check ongoing visits and backlinks before retiring rules
  • Some users still have bookmarks/references

5. Insufficient Monitoring

  • Don't assume migration went smoothly
  • Monitor actively in first weeks
  • Address issues promptly before they compound

Conclusion

Successful site migrations require careful planning of your redirect strategy, meticulous implementation of redirect rules, and diligent post-migration monitoring. By conducting thorough URL audits, creating detailed mapping documents, choosing appropriate redirect strategies for your situation, and monitoring the transition carefully, you can migrate websites while preserving SEO visibility, maintaining user experience, and ensuring search engines successfully crawl and index the new structure. The effort invested in proper redirect planning and implementation pays dividends in smooth migrations with minimal traffic loss and ranking fluctuation.

Technical SEO Holding You Back?

Site speed, crawlability, and security issues hurt rankings. Our team ensures your infrastructure supports your SEO goals.