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.
| If the script powered... | What visitors see | Cost to you |
|---|---|---|
| A popup or exit offer | Nothing appears | Lost email signups |
| A form enhancement or validation | Form looks odd or does not submit | Lost enquiries |
| A chat or callback button | Button missing or dead | Lost conversations |
| A tracking or pixel helper | No events sent | Missing conversions in ad platforms |
| Nothing used any more | Nothing visible | Wasted 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.
- Visitor opens pageHTML loads normally
- Script requested from old CDNDNS error or 404
- Widget or handler never startsPopup, form helper or button missing
- Lead or saleNo chance to convert through that feature
The failed script sits between page load and the feature that visitors needed.
The browser asks the dead host, gets an error, and the feature never appears.
How to check if your site has it
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.
Open DevTools and the Network tab
Press F12 (or Cmd+Option+I on Mac), choose Network and reload the page with the panel open.
Filter for failures
Tick Fetch/XHR and JS, or type
is:failedin the filter box in Chrome. Look for rows in red with a status such as (failed), 404 or ERR_NAME_NOT_RESOLVED.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.
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.
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.
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.
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.
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.
Clear caches
Purge your caching plugin, minification and CDN caches so the old tag is not served from a saved copy.
Search your container
In Workspace, use the search box for the host name. Check Custom HTML tags and templates.
Pause or delete the tag
Remove the tag that loads the dead script, or replace the URL with the vendor's current one if the vendor still exists.
Preview then publish
Use Preview to confirm no failed request remains, then Submit and publish a new version.
Search theme code
Go to Online Store > Themes > Edit code and search for the host name. Check theme.liquid and snippets.
Check installed apps
Apps can leave script tags behind after uninstall. Look in Settings > Apps and sales channels, and remove apps you no longer use.
Delete the leftover tag
Remove the script line from the theme file and save. Duplicate the theme first so you can roll back.
Check custom code
Open Project settings > Custom code and look in Head and Footer code for the host name.
Check pages and embeds
Open page settings > Custom code, and look for Embed elements in the Navigator.
Remove and publish
Delete the tag and publish the site again.
Search the repository
Run a search for the host name across templates, includes and build output.
Remove the tag or vendor the file
Delete the script tag. If you still need the code and have a trusted copy, host it yourself and review it first.
Redeploy and purge caches
Deploy, then clear server, CDN and browser caches.
grep -rIl "cdn.old-plugin-vendor.com" wp-content/plugins wp-content/themes wp-content/mu-pluginsBefore
- 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
- 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
- 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
Year 1
You install a plugin that loads a script from the vendor's CDN.
Year 2
The vendor stops updating the plugin. It still works.
Year 3
The vendor closes and the CDN domain stops resolving.
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
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.
Related issues
- PRF-099Third-party script fails to load (chat, form, payment widget)Fix guide
- PRF-111Third-party script throws console errorsFix guide
- PRF-114Third-party domain expired or hijacked serving malicious JSFix guide
- PRF-112Tag manager container fails to load (blocked, 404)Fix guide
- PRF-100Third-party script slow and blocks renderingFix guide
- PRF-113Ad blockers break core functionality (site depends on blocked script)Fix guide