How to Fix Backlinks Pointing to Old Domains with 301s
After a rebrand or domain move, other sites keep linking to your old domain for years. If those URLs return errors, dead parking pages or a blanket redirect to the homepage, the links are wasted. This guide shows you how to find every linked old URL, redirect each one with a 301 to its equivalent new page, and confirm it works.

Why it matters
Backlinks to a former domain only pass ranking signals to your current site if the old URLs answer with a permanent redirect to a relevant page. A 404, an expired domain or a redirect that dumps everything on the homepage (which Google often treats as a soft 404) throws that authority away. Visitors who click those links also hit dead ends, and AI crawlers that follow citations reach nothing useful.
An expired old domain can be bought by someone else and used to impersonate you.
What you need
Step-by-step fix
Export every backlinked URL on the old domain
Pull the list of old-domain URLs that external sites actually link to, not just the homepage. Useful sources:
- Ahrefs: Site Explorer > enter old-example.com > Pages > Best by links
- Semrush: Backlink Analytics > enter the old domain > Indexed Pages
- Google Search Console: open the old domain property > Links > Top linked pages > Export
Combine the exports into one file, remove duplicates and sort by number of referring domains.
Check what each old URL returns today
Test every URL from your list and record the status code and redirect target. Flag anything returning 404, 410, 5xx, a 302, a redirect chain longer than one hop, or a redirect to the new homepage instead of an equivalent page. Screaming Frog in List mode (Mode > List > Upload) does the same for large lists.
while read url; do
echo "$url $(curl -s -o /dev/null -w '%{http_code} %{redirect_url}' "$url")"
done < old-urls.txtMap each old URL to its closest new page
Build a two-column sheet: old path and new URL. Match on content, not just on similar slugs: a product page goes to the same product, a category to the same category, an article to its updated version. Only send a URL to a parent category when no equivalent exists, and never default everything to the homepage.
old_path,new_url /products/widget-blue.html,https://www.example.com/shop/blue-widget/ /about-us.php,https://www.example.com/about/ /blog/2019/setup-guide,https://www.example.com/guides/setup/
Add server-level 301 redirects on the old domain
Point the old domain's DNS to a server or CDN you control and add permanent redirects there. Put the specific mapped URLs first, then a catch-all that preserves the path. The example is Nginx; the Apache equivalent in .htaccess is:
RewriteRule ^products/widget-blue\.html$ https://www.example.com/shop/blue-widget/ [R=301,L] followed by a catch-all RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L].
# http context
map $request_uri $new_url {
default "";
/products/widget-blue.html https://www.example.com/shop/blue-widget/;
/about-us.php https://www.example.com/about/;
}
server {
listen 80;
listen 443 ssl;
server_name old-example.com www.old-example.com;
ssl_certificate /etc/letsencrypt/live/old-example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/old-example.com/privkey.pem;
if ($new_url) { return 301 $new_url; }
return 301 https://www.example.com$request_uri;
}Keep HTTPS and the registration alive on the old domain
com. Without a valid certificate, browsers show a security warning before the redirect ever happens. g.
com`) and turn on auto-renew at the registrar for the domain itself. Keep redirects in place for at least a year, and indefinitely if the old domain still has valuable links.
Tell Google and update your strongest links
In Google Search Console, open the old domain property, go to Settings > Change of address and select the new property; this requires both properties verified and the old homepage 301-redirecting. Then email the owners of your 10-20 most valuable referring pages and ask them to change the link to the new URL. A direct link is cleaner than a redirected one and survives if the old domain ever lapses.
Re-test the full list and confirm the result
Run the same curl loop or Screaming Frog list crawl from step 2 against your exported URLs. Every line should show 301 with a redirect target that returns 200 and matches your map. Fix any remaining 404s, chains or homepage redirects, then re-run your site audit.
curl -sIL http://old-example.com/products/widget-blue.html | grep -iE '^(HTTP|location)'
Platform-specific notes
Cloudflare
Add the old domain as a zone with proxied DNS records (a dummy A record of 192.0.2.1 works if there is no origin). Use Rules > Redirect Rules with a dynamic expression such as concat("https://www.example.com", http.request.uri.path) and status 301, and keep 'Preserve query string' enabled. For one-to-one mappings, use Bulk Redirects lists at account level. Cloudflare's Universal SSL covers HTTPS automatically.
Shopify
Add the old domain under Settings > Domains > Connect existing domain and make sure your new domain is set as primary; Shopify then 301s the old hostname to the primary with the path kept. For paths that changed, add entries under Online Store > Navigation > URL Redirects (or import a CSV). Shopify only applies these redirects when the old path returns 404 on the store.
WordPress
Plugins like Redirection or Rank Math only work if the old domain points at the same WordPress install. If the old domain is on separate hosting, use .htaccess (Apache/LiteSpeed) or the host's redirect tool. Do not rely on a Site Address change alone, as that does not create path-level redirects for old URLs.
Next.js / Vercel
Add the old domain in Project > Settings > Domains and choose 'Redirect to' your primary domain with 308/301. For path-specific mappings, add entries in next.config.js redirects() using a has: [{ type: 'host', value: 'old-example.com' }] condition with permanent: true.
Wix / Squarespace
Connect the old domain to the same site as a secondary domain so it redirects to the primary. Add path-level redirects in Wix under Settings > SEO > URL Redirect Manager, or in Squarespace under Settings > Developer Tools > URL Mappings using the format /old-path -> /new-path 301.
Check that it worked
✅ How to verify
- Run curl -sIL on a sample of old URLs and confirm one 301 hop followed by a 200 on the matching new page.
- Crawl the exported backlink URL list in Screaming Frog List mode and filter for any non-301 responses or redirects to the homepage.
- In Search Console, check the old property's Page indexing report shows URLs as 'Page with redirect' and the Change of address status as complete.
- Re-run your site audit and confirm the 'Links to old domains' check passes.
⚠️ Common mistakes
- Redirecting every old URL to the new homepage, which Google tends to treat as a soft 404 and which loses most of the link value.
- Letting the old domain or its SSL certificate expire, which breaks https backlinks or hands the domain to a squatter.
- Using 302 or JavaScript/meta-refresh redirects instead of a server-side 301 or 308.
- Creating chains (old http > old https > new http > new https) instead of a single hop to the final URL.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
How long should I keep redirects from my old domain?
Google recommends at least 180 days, but backlinks to the old domain keep sending value and visitors for years. Keep the domain registered and the redirects live as long as the old domain still has meaningful links.
Do 301 redirects from an old domain pass link equity?
Yes. Google has confirmed that 301 and 308 redirects pass ranking signals, provided the target is a relevant equivalent page. Redirects to unrelated pages or the homepage pass little or nothing.
Should I redirect old URLs that have no backlinks?
Yes, a path-preserving catch-all handles them at no extra cost. Prioritize manual mapping for URLs with backlinks or traffic and let the catch-all cover the rest.
Is it better to ask sites to update links or rely on redirects?
Do both. Redirects cover every link immediately, while getting your top referring sites to link directly to the new URL removes dependence on the old domain and avoids an extra hop.
How to Fix a High Spam Score of Linking Domains
How to Create Linkable Assets That Earn Backlinks
How to Fix Sitewide Footer Backlinks Pointing to Your Site
How to Get Your Brand Into "Best Of" Roundup Articles
How to Fix Missing Creator Collaborations for Your Brand
How to Set Up and Link Your Review Platform Profiles