On this page
What this issue is
A migration changes URLs: a new platform, a new theme, a new slug structure, or a move to a new domain. Your ad platforms do not know. Ads, sitelinks, email links, QR codes and partner pages still use the old URL. If the new site has no redirect (a rule that sends visitors from the old address to the new one), the server answers with a 404 Not Found page.
- Ad clickOld URL in the ad
- Old URLNo redirect, returns 404
- Landing pageNever reached
- Lead or saleNever happens
The ad still works, the old URL does not.
Why it costs you leads or sales
Example: illustrative conversion rates for the same campaign. Clicks landing on a 404 convert at close to zero.
How to check if your site has it
Export ad destination URLs
In Google Ads, download the Ads report with the Final URL column, and do the same for sitelinks and other assets. In Meta Ads Manager, export ads with the Website URL column. Repeat for TikTok, LinkedIn, Bing and the rest.
Add other sources of old links
Check email templates, social bios, QR codes, partner pages, your Google Business Profile and the old sitemap.xml (from a backup or the Wayback Machine).
Check status codes in bulk
Run the list through a crawler such as Screaming Frog in List mode, or use curl. Anything returning 404 or 410 needs a redirect.
Look at Search Console
In Google Search Console, open Pages and the Not found (404) reason to see old URLs Google still knows about.
while read url; do
code=$(curl -s -o /dev/null -w "%{http_code}" -L "$url")
echo "$code $url"
done < old-urls.txtHow to fix it
| Old URL | New URL | Type |
|---|---|---|
| /lp/summer-offer.html | /offers/summer | 301 |
| /contact-us.php | /contact | 301 |
| /services/seo-london | /seo-services | 301 |
Use a redirect tool
Install a redirect plugin such as Redirection or use the redirect feature in your SEO plugin. Add each old path as the source and the new URL as the target, type 301.
Import in bulk
Most redirect plugins accept a CSV import, so you can paste the whole map at once.
Open URL redirects
Go to Online Store > Navigation > View URL Redirects (or Content > Menus depending on your admin version) and choose Create URL redirect.
Import a CSV
Use Import with a CSV that has columns Redirect from and Redirect to. Shopify keeps the query string on these redirects.
Add 301 redirects
Open Site settings > Hosting > 301 redirects. Enter the old path and the new path. Publish the site for them to take effect.
Use the Redirect Manager
Go to Settings > SEO > URL Redirect Manager, add old and new URLs, and save. You can upload a CSV for many at once.
Add URL mappings
Open Settings > Developer Tools > URL Mappings and add one rule per line in the form /old -> /new 301.
Add server rules
On Apache use Redirect 301 or RewriteRule in .htaccess; on Nginx use a location or map block. Both pass the query string through by default for simple redirects.
Redirect 301 /lp/summer-offer.html /offers/summer
Redirect 301 /contact-us.php /contactlocation = /lp/summer-offer.html { return 301 /offers/summer$is_args$args; }
location = /contact-us.php { return 301 /contact$is_args$args; }Update the ads
Edit the final URLs in each ad platform to the new addresses, so you stop relying on redirects. Keep the redirects in place for old links elsewhere.
Re-check the list
Run the same old-URL list again. Each should return one 301 and then a 200.
How to confirm it's fixed
curl -sIL "https://example.com/lp/summer-offer.html?gclid=test&utm_source=google" | grep -iE "^(HTTP|location)"No redirect
- Old URL returns 404
- Visitor sees an error page
- Ad click is paid and wasted
301 redirect
- Old URL returns 301 then 200
- Visitor lands on the matching offer
- gclid and UTMs reach the new page
How to prevent it happening again
- Export all ad, email and sitemap URLs before you start
- Write the redirect map before launch, not after
- Redirect page to page, never everything to the homepage
- Test redirects on staging with a query string
- Re-check the old-URL list the day after launch and again a week later
- Update ad final URLs, then keep the redirects for old links
- Keep redirects for at least a year
How FunnelGuard handles this
The click is paid for, but the visitor sees a 404.
Day 0
Site migrates, URLs change, no redirect map.
Day 1
Ads keep sending clicks to old URLs that return 404.
Day 5
Leads drop and someone notices.
Day 6
301 redirects added and tested with gclid.
Questions people ask
Why are my Google Ads going to a 404 page after a site migration?
The ads still use the old final URLs, and the new site has no redirect from them. The server cannot find the old path, so it returns 404. Add a 301 redirect from each old URL to its new page and update the final URLs in your ads.
Should I use a 301 or 302 redirect for old landing pages?
Use a 301 when the move is permanent, which it usually is after a migration. A 301 tells browsers and search engines the new address replaces the old one. A 302 is for temporary moves only.
Will a redirect keep my gclid and UTM parameters?
Usually yes, if the redirect passes the query string through. Some rules and plugins drop it, so test with ?gclid=test&utm_source=test added and check the final URL. If parameters vanish, change the rule to preserve the query string.
How do I find all the old URLs my ads use?
Export final URLs from each ad platform, including sitelinks and other assets. Add URLs from emails, QR codes and your old sitemap, then check them in bulk with a crawler or curl. Search Console's Not found (404) report also lists old URLs Google knows about.
Can I just redirect all old URLs to the homepage?
It is better not to. Visitors expect the offer in the ad, and a homepage redirect loses it. Search engines may also treat mass homepage redirects as soft 404s. Redirect each old URL to its closest new page.
How long should I keep redirects after a migration?
Keep them for at least a year, and longer if old links are still used. Redirects cost almost nothing to keep, and old links on other sites and in emails can last for years.
Does FunnelGuard find old URLs that 404?
Only partly. It checks the URLs that are in your journeys, so a journey that starts from an old ad URL will alert you when it 404s. It does not discover old URLs by itself, so you need to check the rest by hand.
Related issues
- OPS-002Homepage up but a funnel page returns 404Fix guide
- OPS-018Trailing-slash or case-sensitive URL variant 404sFix guide
- OPS-017www and apex behave differently (one broken)Fix guide
- OPS-013Thank-you page down while landing page is upFix guide
- OPS-009Maintenance / coming soon mode left on after workFix guide
- OPS-001Whole site down (connection refused / no response)Fix guide