URL Migration Guide: Preventing SEO Loss When Moving Sites

Protect your SEO performance during site moves and URL changes. Step-by-step migration plan, redirect strategies, and checklist.

URL migration is one of the riskiest operations for websites. Done incorrectly, you can lose years of accumulated SEO value. In this guide, we examine safe migration strategies and the step-by-step process.

Migration Types

1. Domain Change

olddomain.com → newdomain.com

The riskiest migration type. All URLs change.

2. Protocol Change

http://example.com → https://example.com

Relatively safe, but still requires attention.

3. URL Structure Change

/products.php?id=123 → /product/product-name
/blog/2024/01/title → /blog/title

4. CMS/Platform Change

WordPress → Next.js
Shopify → WooCommerce

5. Subdomain Change

blog.example.com → example.com/blog
m.example.com → example.com (responsive)

Pre-Migration Preparation

1. Document Current State

# Export all URLs
- From sitemap
- From Google Search Console
- With crawl tools (Screaming Frog)

# Record important metrics
- Organic traffic
- Keyword rankings
- Backlink profile
- Core Web Vitals scores

2. Create URL Mapping

# CSV format mapping file
old_url,new_url
/old-page,/new-page
/category/old,/category/new
/product?id=123,/product/product-name

3. Identify Priority Pages

301 Redirect Strategy

Nginx Configuration

# Single page redirect
location = /old-page {
    return 301 /new-page;
}

# Pattern-based redirect
location ~ ^/blog/(\d{4})/(\d{2})/(.*)$ {
    return 301 /blog/$3;
}

# Domain change
server {
    server_name olddomain.com www.olddomain.com;
    return 301 https://newdomain.com$request_uri;
}

Apache .htaccess

# Domain change
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]

Migration Steps

Step 1: Staging Environment

  1. Set up new site in staging
  2. Migrate all content
  3. Test URL mapping
  4. Update internal links

Step 2: Redirect Tests

# Test redirects
curl -I https://olddomain.com/test-page

# Expected response:
HTTP/1.1 301 Moved Permanently
Location: https://newdomain.com/test-page

Step 3: Google Search Console

  1. Add new site to Search Console
  2. Use "Change of Address" for domain changes
  3. Submit new sitemap
  4. Remove old sitemap

Step 4: Go-Live

  1. Make DNS changes
  2. Activate SSL certificate
  3. Enable redirects
  4. Verify robots.txt

Post-Migration Monitoring

First 24-48 Hours

First Week

First Month

Common Mistakes

1. Redirect Chains

# WRONG
A → B → C → D

# CORRECT
A → D
B → D
C → D

2. Soft 404s

# WRONG - 200 response with 404 content
HTTP/1.1 200 OK
<h1>Page not found</h1>

# CORRECT
HTTP/1.1 404 Not Found

3. Not Updating Internal Links

# Old internal links hit redirects
<a href="/old-url">Link</a>  → 301 → /new-url

# Link directly to new URL
<a href="/new-url">Link</a>

Migration Checklist

Before

During

After

Conclusion

URL migration is a critical process requiring careful planning and execution. With comprehensive URL mapping, correct 301 redirects, and continuous monitoring, you can preserve your SEO value. SEO-friendly URLs created with SlugURL support your search engine performance even after migration.