Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Internal links still pointing to old domain: how to find and fix

SEO-307Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

You moved from old-example.com to new-example.com. The 301 redirects are in place, so the site seems to work. But pages, menus, buttons, images and scripts still contain links written with the full old address, such as https://old-example.com/pricing/. These are called hardcoded absolute URLs. A redirect hides them from you, but they are still wrong.

Each old link adds a redirect hop. That slows the page, and it can drop tracking parameters if the redirect is not set up to keep them. If the old domain expires, is parked, or loses its redirects, those links become dead ends. Visitors land on an error page instead of your form, checkout or booking page.

What happens when an old-domain link is clicked
  1. Visitor on new siteClicks a menu or button
  2. Link to old domainHardcoded https://old-example.com/...
  3. Redirect hopSlower, may drop UTMs or gclid
  4. Form or checkoutLost if redirects are removed

The redirect hides the problem until it stops working.

An old-domain link adds a redirect that can strip parameters

If the redirect does not pass the query string, campaign data is lost on the way.

Find old-domain links
  1. Crawl the new site

    Use a crawler such as Screaming Frog or Sitebulb. Crawl the new domain, then filter the outlinks and resources for your old domain name. Also look for internal URLs that return a 301.

  2. Search the page source

    Open key pages, view the source (Ctrl+U or Cmd+Option+U) and search for the old domain. Check the header, footer, canonical tag, image URLs and scripts.

  3. Search your database or export

    In WordPress, search posts, postmeta and options for the old domain. On other platforms, export content and search the file.

  4. Check sitemaps and feeds

    Open sitemap.xml and any RSS feed and search for the old domain.

  5. Check Search Console

    In Google Search Console, the Links report shows your top internally linked pages. Look for unexpected URLs, and check Pages for redirect issues.

Quick check from a terminalbash
curl -s https://new-example.com/ | grep -o 'https\?://old-example\.com[^"\x27 ]*' | sort -u

Replace old-domain links with the new domain, or with relative links such as /pricing/ where the platform allows it. Take a backup first. Keep the 301 redirects in place for outside links.

Replace old-domain links by platform
  1. Back up the database

    Use your host's backup or a backup plugin before changing anything.

  2. Run a search and replace

    Use a tool such as WP-CLI (wp search-replace) or a search and replace plugin. Do a dry run first. It handles serialized data safely, which a plain SQL replace does not.

  3. Check Settings > General

    Make sure WordPress Address and Site Address use the new domain.

  4. Check page builder and theme settings

    Elementor, Divi and others may need their own URL replace tool or cache regeneration. Menus under Appearance > Menus may hold custom links.

WordPress: dry run, then replace with WP-CLIbash
wp search-replace 'https://old-example.com' 'https://new-example.com' --dry-run
wp search-replace 'https://old-example.com' 'https://new-example.com' --skip-columns=guid
After the cleanup
  • Re-crawl the site: no links, images, scripts or canonical tags use the old domain
  • No internal link returns a 301 or 302
  • sitemap.xml lists only new-domain URLs
  • The curl check above returns nothing
  • Key forms, checkout and booking buttons open the new-domain page directly
  • Old URLs still 301 to the right new pages for outside links
Prevention
  • Add 'search for the old domain' to every migration checklist
  • Use relative links or a single base URL setting
  • Pick pages from the link picker instead of pasting full URLs
  • Run a crawl after each domain, staging or platform change
  • Review email, SMS and ad landing links as well as website pages
  • Keep redirects live for at least a year

FunnelGuard does not check for this yet. Scanning for old-domain links is a possible future check, not a current feature.

What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and check each step and the tracking hits sent to ad and analytics platforms. If an old-domain link leads a journey to a broken page, or a redirect drops tracking, the journey itself may fail and trigger an alert. That is a side effect, not a dedicated check for the link problem.

Questions people ask

Why are my internal links still pointing to the old domain after migration?

Migration tools often only update the main content they know about. Links stored in menus, widgets, page builder fields, theme options, custom code and CMS fields can keep the old absolute URL. A crawl or a database search finds them.

Do I need to fix old-domain internal links if I have 301 redirects?

Yes. Redirects keep the links working, but each click gets slower and can lose tracking parameters. If the redirects are removed or the old domain lapses, those links break. Update them to the new domain and keep the redirects for outside links.

How do I find all links to my old domain?

Crawl the new site with a tool such as Screaming Frog and search the results for the old domain. Also search your database or content export, the sitemap and the page source. Check custom code, emails and templates too.

How do I replace the old domain in WordPress?

Back up the site, then use WP-CLI's wp search-replace or a search and replace plugin that handles serialized data. Do a dry run first. Afterwards, check page builder content and menus, and clear caches.

Should I use relative or absolute internal links?

Relative links such as /pricing/ survive a domain change without edits. Absolute links are fine if you use the new domain and manage it in one place. Avoid pasting full URLs by hand where the platform offers a link picker.

Do old-domain internal links hurt SEO?

They can slow the transfer of signals to the new domain, add redirect hops and waste crawl time. Google follows redirects, so it is rarely a disaster, but it is easy to fix and worth doing.

Does FunnelGuard check for internal links to the old domain?

Not yet. It is a possible future check. FunnelGuard runs your customer journeys and may fail if an old link leads to a broken step, but it does not scan for old-domain links. Use a crawler for that.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

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.