Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Abandoned plugin script from a dead CDN host: how to fix it

PRF-115Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A CDN (content delivery network) is a host that serves files such as scripts, fonts and images for many sites. Plugins, themes and embed snippets often point to a CDN address like https://cdn.old-plugin-vendor.com/widget.js. If the vendor closes, lets the domain lapse or moves the files, that address stops working.

Why it costs you leads or sales

The damage depends on what the script did. A dead script can be harmless clutter, or it can quietly break something that brings in leads.

What a dead plugin script can affect
If the script powered...What visitors seeCost to you
A popup or exit offerNothing appearsLost email signups
A form enhancement or validationForm looks odd or does not submitLost enquiries
A chat or callback buttonButton missing or deadLost conversations
A tracking or pixel helperNo events sentMissing conversions in ad platforms
Nothing used any moreNothing visibleWasted request, possible delay if it hangs

Even when the feature is unused, a request to a host that hangs can delay rendering, and a script that was meant to run before others can leave later code waiting. It also fills your console with errors, which hides real problems.

How a dead CDN script breaks a lead path
  1. Visitor opens pageHTML loads normally
  2. Script requested from old CDNDNS error or 404
  3. Widget or handler never startsPopup, form helper or button missing
  4. Lead or saleNo chance to convert through that feature

The failed script sits between page load and the feature that visitors needed.

A page requesting a script that no longer exists

The browser asks the dead host, gets an error, and the feature never appears.

How to check if your site has it

Find failed script requests in your browser
  1. Open the page in a private window

    Use your key landing page, form page and checkout. A private window avoids extensions that change what loads.

  2. Open DevTools and the Network tab

    Press F12 (or Cmd+Option+I on Mac), choose Network and reload the page with the panel open.

  3. Filter for failures

    Tick Fetch/XHR and JS, or type is:failed in the filter box in Chrome. Look for rows in red with a status such as (failed), 404 or ERR_NAME_NOT_RESOLVED.

  4. Note the host name

    Copy the full URL. Check whether the domain still exists by searching it or opening it in a new tab. If it does not resolve, it is dead.

  5. Check the Console tab too

    Errors like 'Failed to load resource' and 'Uncaught ReferenceError: X is not defined' often point to code that expected the dead script to be present.

  6. Search your source

    View page source and search for the dead host name to see where the tag sits (head, footer, or inside another script).

How to fix it

First decide whether you still need the feature. If it is gone and unused, delete the source. If you need it, replace it with a maintained version. Never leave a tag pointing at a host you do not control or trust.

Remove or replace the dead script
  1. Find the plugin that adds it

    Search the host name in your plugin and theme files (wp-content/plugins and wp-content/themes) using your host's file manager, SSH or a code search. The match shows which plugin enqueues it.

  2. Update or remove the plugin

    Go to Plugins > Installed Plugins. If the plugin has not been updated in years, deactivate it, test, then delete it. Choose a maintained alternative if you still need the feature.

  3. Check theme and custom code

    Look in Appearance > Theme File Editor (header.php, footer.php), and in any header and footer snippet plugin, for a leftover script tag.

  4. Clear caches

    Purge your caching plugin, minification and CDN caches so the old tag is not served from a saved copy.

Find the dead host in a WordPress installbash
grep -rIl "cdn.old-plugin-vendor.com" wp-content/plugins wp-content/themes wp-content/mu-plugins
Page before and after cleanup

Before

  • Network tab shows a red failed request to the old CDN
  • Console shows 'Failed to load resource' errors
  • Popup or widget never appears

After

  • No failed requests to the dead host
  • Console is clear of that error
  • Feature works through a maintained source, or is removed on purpose

How to confirm it's fixed

Confirm the fix
  • Hard reload the page in a private window with the Network tab open
  • Search the Network list for the old host name and find no rows
  • Check the Console for no related errors
  • Test the form, button or popup that depended on the script
  • View source and confirm the old host name is gone
  • Repeat on your main landing, form and checkout pages

How to prevent it happening again

Prevention habits
  • Delete plugins and apps you no longer use, rather than only deactivating them
  • After uninstalling anything, search your theme and tag manager for leftover tags
  • Review plugins that have not been updated in more than a year
  • Keep a list of third-party hosts your site loads and who owns each
  • Load scripts from vendors you trust, and avoid pointing at personal or short-lived domains
  • Recheck key pages after plugin, theme or tag changes
How a dead script usually appears (example)
  1. Year 1

    You install a plugin that loads a script from the vendor's CDN.

  2. Year 2

    The vendor stops updating the plugin. It still works.

  3. Year 3

    The vendor closes and the CDN domain stops resolving.

  4. Year 3+

    Every page view logs a failed request until someone removes the tag.

How FunnelGuard handles this

FunnelGuard detects this today. When its robot visitor runs your journeys on a schedule, it records requests that fail to load on the pages it visits. A script request to a dead CDN host shows up as a failed resource, which is what this check reports.

A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause. FunnelGuard tells you that a resource failed and where; you still need to work out which plugin or snippet adds it and remove it, using the steps above. The Free plan covers 1 site and 2 journeys with daily checks and no card, and a free read-only website audit is also available.

Why it can be worth fixing early

Failed requests per 1,000 page viewsExample numbers
Failed requests per 1,000 page views (example)Site-wide dead tag: 1,000 requests; Single-page dead tag: 60 requests; After cleanup: 0 requests03837671,000600Site-wide dead tagSingle-page dead tagAfter cleanuprequests

Example: one dead script tag in a site-wide footer fails on every page view, while a tag only on one page fails far less often.

Questions people ask

Why is my site trying to load a script from a CDN that no longer exists?

A plugin, theme, app or tag manager tag still outputs a script tag pointing to the old address. Removing the plugin's settings or files does not always remove the tag. Search your source for the host name to find what adds it.

How do I find which plugin is loading a script from a dead host?

Open DevTools, go to Network, reload and filter for failed requests to copy the URL. Then search your plugin, theme and tag manager code for that host name. On WordPress, a grep across wp-content works well.

Does a failed CDN script slow down my website?

It can. If the host does not answer, the browser may wait for a timeout, and scripts that depend on it can stall. Even when it fails fast, it adds errors to the console and wastes a request on every page view.

Is a script from an expired domain dangerous?

It can be. Someone can register an expired domain and serve malicious code to your visitors through the tag you left in place. If the host resolves to something unexpected, remove the script straight away and review your site for other changes.

Can I just leave the broken script if everything looks fine?

It is better to remove it. It may be hiding a broken feature, it clutters your error logs, and it leaves you exposed if the domain is taken over. Cleaning it up takes little time once you find the source.

How do I remove a leftover script after uninstalling a plugin?

Search your theme files, header and footer snippet settings and tag manager for the old host name or script URL. Delete the tag, clear all caches and reload with the Network tab open to confirm no request remains.

How does FunnelGuard detect a dead CDN script?

FunnelGuard's robot visitor loads your pages on a schedule and records resources that fail to load. A script that cannot be fetched from a dead host appears as a failed resource, and you get one alert after a second-region recheck.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: failed resource.

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.