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.comThe riskiest migration type. All URLs change.
2. Protocol Change
http://example.com → https://example.comRelatively safe, but still requires attention.
3. URL Structure Change
/products.php?id=123 → /product/product-name
/blog/2024/01/title → /blog/title4. CMS/Platform Change
WordPress → Next.js
Shopify → WooCommerce5. 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 scores2. Create URL Mapping
# CSV format mapping file
old_url,new_url
/old-page,/new-page
/category/old,/category/new
/product?id=123,/product/product-name3. Identify Priority Pages
- Highest traffic pages
- Most backlinked pages
- Highest converting pages
- Important landing 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
- Set up new site in staging
- Migrate all content
- Test URL mapping
- 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-pageStep 3: Google Search Console
- Add new site to Search Console
- Use "Change of Address" for domain changes
- Submit new sitemap
- Remove old sitemap
Step 4: Go-Live
- Make DNS changes
- Activate SSL certificate
- Enable redirects
- Verify robots.txt
Post-Migration Monitoring
First 24-48 Hours
- Monitor 404 errors
- Check crawl errors
- Verify critical page accessibility
First Week
- Compare organic traffic
- Check indexing status
- Monitor important keyword rankings
First Month
- Compare backlink profile
- Monitor Core Web Vitals
- Analyze conversion rates
Common Mistakes
1. Redirect Chains
# WRONG
A → B → C → D
# CORRECT
A → D
B → D
C → D2. Soft 404s
# WRONG - 200 response with 404 content
HTTP/1.1 200 OK
<h1>Page not found</h1>
# CORRECT
HTTP/1.1 404 Not Found3. 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
- Complete list of current URLs
- URL mapping file
- Backlink analysis
- Traffic and ranking baseline
- Staging environment ready
- Redirect rules tested
During
- DNS change complete
- SSL active
- Redirects working
- robots.txt correct
- Search Console updated
- Sitemap submitted
After
- 404 monitoring active
- Crawl errors checked
- Traffic monitored
- Rankings monitored
- Backlinks verified
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.