Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Old ad URLs returning 404 after a migration: how to fix them

OPS-019High impactPartlyBy FunnelGuardPublished Updated
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.

Where a paid click is lost
  1. Ad clickOld URL in the ad
  2. Old URLNo redirect, returns 404
  3. Landing pageNever reached
  4. Lead or saleNever happens

The ad still works, the old URL does not.

Why it costs you leads or sales

Paid clicks that convert, before and after migrationExample numbers
Paid clicks that convert, before and after migration (example)Before migration: 4 %; After, no redirects: 0.5 %; After, redirects added: 3.9 %02340.53.9Before migrationAfter, no redirectsAfter, redirects added%

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

Find old URLs that now 404
  1. 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.

  2. 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).

  3. 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.

  4. Look at Search Console

    In Google Search Console, open Pages and the Not found (404) reason to see old URLs Google still knows about.

Check a list of old URLs for status codesbash
while read url; do
  code=$(curl -s -o /dev/null -w "%{http_code}" -L "$url")
  echo "$code $url"
done < old-urls.txt

How to fix it

Example redirect map
Old URLNew URLType
/lp/summer-offer.html/offers/summer301
/contact-us.php/contact301
/services/seo-london/seo-services301
Add the redirects on your platform
  1. 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.

  2. Import in bulk

    Most redirect plugins accept a CSV import, so you can paste the whole map at once.

Apache .htaccess: 301 redirects that keep the query stringhtaccess
Redirect 301 /lp/summer-offer.html /offers/summer
Redirect 301 /contact-us.php /contact
Nginx: 301 redirects (query string is kept)nginx
location = /lp/summer-offer.html { return 301 /offers/summer$is_args$args; }
location = /contact-us.php { return 301 /contact$is_args$args; }
After the redirects are live
  1. 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.

  2. 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

Check the redirect and the parametersbash
curl -sIL "https://example.com/lp/summer-offer.html?gclid=test&utm_source=google" | grep -iE "^(HTTP|location)"
Old ad URL, before and after

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

Before every migration or URL change
  • 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

An old ad URL returns an error

The click is paid for, but the visitor sees a 404.

How it unfolds after a migration
  1. Day 0

    Site migrates, URLs change, no redirect map.

  2. Day 1

    Ads keep sending clicks to old URLs that return 404.

  3. Day 5

    Leads drop and someone notices.

  4. 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.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: Only URLs in journeys are checked.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.