How to Clean Up Broken Links After Migrating to a New Domain
A domain migration is the most disruptive SEO event most sites will ever go through. Done well, the site emerges intact. Done poorly, it can take 6-18 months to recover the traffic that was lost.
The broken link problem is central to that outcome. When you move from old-domain.com to new-domain.com, every internal link on the site, every external backlink from other sites, and every Google index entry for your old domain is now pointing at a URL on a domain that may not exist or may not redirect correctly.
This guide is specifically about the broken link cleanup that needs to happen after a migration - what to fix, in what order, and how to verify the work is done correctly.
The Scale of the Problem After a Migration
It helps to understand what actually breaks during a domain migration before diving into fixes.
Internal links: Every page on your old domain that linked internally used the old domain name. If those pages were copied to the new domain as-is, they are now pointing at old-domain.com/... from within new-domain.com. These are broken internal links by any practical definition - they leave your new domain, hit a redirect (if one is set up), and come back. Or they return 404 if no redirect is in place.
External backlinks: Every site that linked to you over the years points to the old domain. These represent accumulated authority. Without redirects, that authority stops flowing the moment the old domain goes dark.
Google’s index: Google has thousands or millions of URLs indexed for your old domain. Until those are all crawled, found to redirect, and the index is updated to the new domain, your rankings are in a state of transition. This process can take 3-6 months for large sites.
Bookmarks, shared links, partner integrations: Users who bookmarked your old URLs, partners who link to your resources in their documentation, email campaigns with old links - all of these hit your old domain.
Before the Migration: The URL Inventory
If the migration has already happened, skip ahead. But if you are reading this before migrating, the single most valuable thing you can do is create a complete URL inventory of the old domain first.
This means: every URL that returns 200 on the old domain, with its traffic data (from GSC or GA) and backlink count (from Ahrefs, Semrush, or GSC’s Links report).
This inventory is the reference for every redirect decision. Without it, you are guessing at what needs redirects.
You can do this easily via redCacti. Sign up for free and add a website to begin a crawl.
Once a crawl report is generated, you can export out the inventory in a CSV format. redCacti crawls all (non-login protected pages and crawl allowed pages) that it can find on your domain automatically.
Step 1: Confirm the Redirect Structure Is Correct
Before fixing broken links, confirm the foundation is in place: the old domain should 301 redirect every URL to the equivalent URL on the new domain.
The ideal redirect pattern:
https://old-domain.com/[path] -> https://new-domain.com/[path]
This is a path-preserving redirect: the URL structure stays the same and only the domain changes. It is the simplest and most reliable approach.
Test a sample of key URLs:
curl -I https://old-domain.com/your-top-post/
Expected output:
HTTP/1.1 301 Moved Permanently
Location: https://new-domain.com/your-top-post/
Then:
curl -I https://new-domain.com/your-top-post/
Expected: HTTP/2 200
Check at least your top 10 URLs by traffic and your homepage. If any of these return 404 instead of 301 on the old domain, the redirect setup is incomplete and needs to be fixed before anything else.
If the URL structure changed during the migration:
If you changed URL slugs or restructured the site at the same time as migrating domains, the redirect becomes more complex: https://old-domain.com/old-path/ -> https://new-domain.com/new-path/. This requires a full redirect map (documented separately) rather than a simple domain-level redirect rule.
Step 2: Fix Internal Links on the New Domain
Once the redirects are confirmed, fix the internal links on your new domain. Every internal link that references old-domain.com should be updated to use new-domain.com directly.
This matters because:
- Internal links pointing through a cross-domain redirect pass less equity than direct links
- Crawlers following internal links that redirect off-domain and back are making unnecessary requests
- Any breakdown in the old domain’s redirect setup will immediately break these links
How to find old-domain internal links on the new site:
Run a site crawl on new-domain.com and filter for links where the destination URL contains old-domain.com. Every one of these is an internal link that needs updating.
Alternatively:
# Using grep on a static export or local file copy
grep -r "old-domain.com" ./site-files/ --include="*.html"
How to update them:
On WordPress:
wp search-replace 'https://old-domain.com' 'https://new-domain.com' --dry-run
wp search-replace 'https://old-domain.com' 'https://new-domain.com'
This updates the entire database in one pass. Run the --dry-run first to verify the scope of changes.
On Webflow: Manual update in the Designer for each affected element. There is no bulk find-and-replace.
On Squarespace: Manual update in the content editor for each page. No bulk option.
Static sites with source files:
Use a find-and-replace across the source repository. In VS Code: Edit -> Find in Files, search for old-domain.com, replace with new-domain.com.
Step 3: Update Google Search Console
GSC has a specific tool for notifying Google of a domain migration: the Change of Address tool.
How to use it:
- Verify ownership of the new domain in GSC (if not already verified)
- In the old domain’s GSC property, go to Settings -> Change of Address
- Select the new domain property and submit
This tells Google to migrate its index from the old domain to the new one and speeds up the reindexing process. Without this, Google discovers the redirects through natural crawling, which is slower.
Submit new sitemaps:
After migration, submit the new domain’s sitemap in GSC. Also ensure the old domain’s sitemap has been removed or updated - it should not be directing Google to old-domain URLs as if they are canonical.
Step 4: Find and Fix Remaining 404s on the New Domain
Even with a clean redirect setup and updated internal links, domain migrations reliably produce some 404s that were not anticipated. Run a full crawl of the new domain within 48 hours of launch.
What to look for:
- URLs on the new domain returning 404 - these are pages that exist on the old site but were not migrated to the new domain
- Internal links on the new domain that reference non-existent paths
- Sitemap entries on the new domain that return 404
Common sources of post-migration 404s:
Media and assets: Images, PDFs, and downloadable files sometimes do not transfer cleanly during migrations. The pages migrate but the assets at their old URLs do not.
Dynamically generated URLs: Category pages, tag pages, author archives, and pagination URLs may not exist at the same paths on the new domain depending on the CMS configuration.
Old campaign URLs: Marketing campaign pages, landing pages, and event pages from the old domain that were not included in the migration scope.
For each 404 found, decide: recreate the page at that URL on the new domain, or add a redirect from that URL to the most relevant live page.
Step 5: Reclaim Backlinks Pointing to the Old Domain
The 301 redirects from old domain to new domain handle backlinks automatically - link equity passes through the redirect to the new domain. However, a direct link is always slightly more valuable than a redirected one.
For your highest-value backlinks, it is worth reaching out to request an update to the new domain URL.
Identify your top backlinks:
In GSC -> Links -> Top linked pages (using the old domain’s property), or from a backlinks tool:
- Sort by domain authority of the linking site
- Prioritise referring domains that send you real traffic (check referral traffic in GA)
- Focus on editorial placements, partner pages, and resource links - these are most likely to be updated when asked
What to send:
Keep it short. “Hi - we recently migrated to [new-domain.com] and noticed you still link to [old URL]. Would you be able to update the link to [new URL]? Appreciate it.”
Most site owners respond to this because it is a legitimate and low-effort request. Aim to contact the top 20-30 referring domains over the first month post-migration.
Step 6: Monitor for 30 Days Post-Migration
Domain migrations surface new issues for weeks after launch. Pages that seemed fine in testing turn out to have edge cases in production. GSC surfaces 404 errors that were invisible in a pre-launch crawl.
Set up weekly monitoring:
Add the new domain to redCacti with a weekly crawl schedule. Review the broken links report every Monday for the first month. Any new 404 or broken link appearing post-migration should be treated as a migration artifact and fixed with priority.
Watch GSC signals:
- Coverage report: new 404 errors appearing in the first few weeks
- Performance report: track impressions and clicks on the new domain vs. the old domain - equity should transfer within 4-8 weeks for well-executed migrations
- Crawl stats: if you see a spike in 404 responses in crawl stats, redirects are failing somewhere
What to expect for ranking recovery:
A well-executed migration with proper redirects typically sees:
- Traffic dip of 10-30% in the first 2-4 weeks while Google reindexes
- Recovery to 80-90% of pre-migration levels within 4-8 weeks
- Full recovery or improvement within 3-4 months
If traffic does not begin recovering after 6 weeks, the redirects are likely not working correctly for some URLs. Use GSC’s Coverage report to identify which old URLs are not being found and cross-reference with your redirect setup.
Domain Migration Broken Link Checklist
Pre-migration (if still possible):
- Export full URL inventory of old domain with traffic and backlink data
- Create redirect map for every URL that changes path (if restructuring simultaneously)
Redirect verification:
- Confirm old domain 301 redirects to new domain for homepage
- Spot-check top 10 URLs for correct 301 status
- Verify no redirect chains (old URL should resolve in 1-2 hops maximum)
- Check both www and non-www versions redirect correctly
- Check both http and https versions redirect correctly
Internal links:
- Run crawl of new domain and filter for links pointing to old domain
- Perform database search-and-replace (WordPress) or manual updates (other platforms)
- Verify internal links no longer reference old domain
GSC and sitemaps:
- Use GSC Change of Address tool to notify Google
- Submit new domain sitemap in GSC
- Remove old domain sitemap or update to reflect redirects
Post-migration monitoring:
- Full-site crawl within 48 hours of launch
- Weekly crawls with redCacti for 30 days post-migration
- Monitor GSC Coverage report for new 404s
- Outreach to top 20-30 referring domains to update backlinks
Domain migrations are stressful. The broken link cleanup is one of the most mechanical parts of the process - it does not require guesswork, just systematic checking and fixing.
The two highest-leverage actions: make sure the old domain redirects are correct (one URL to one URL, with the right 301 status), and update internal links on the new domain to stop referring to the old one. Everything else is incremental improvement.
Audit your site for migration-related broken links ->
Free, no login required. Finds broken links, redirect chains, and cross-domain link issues in one crawl.
Also in this series: How to Set Up 301 Redirects After Fixing Broken Links - How to Audit All Links Before a Website Redesign
Newsletter
Weekly SEO teardowns
Internal linking, broken links & orphan pages — straight to your inbox, every week.