Fix net::ERR_BLOCKED_BY_CLIENT (ad blocker, analytics, "ads" files)
GET https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX net::ERR_BLOCKED_BY_CLIENT
- Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
- POST https://example.com/api/ads/stats net::ERR_BLOCKED_BY_CLIENT
- GET https://example.com/js/advert.js net::ERR_BLOCKED_BY_CLIENT
- The resource at “https://connect.facebook.net/en_US/fbevents.js” was blocked because content blocking is enabled.
- net::ERR_BLOCKED_BY_CLIENT.Inspector
The request never left: a browser extension (uBlock Origin, AdBlock, Privacy Badger) or Brave Shields blocked it because its URL looks like advertising or tracking. Check in a private window without extensions, rename your own files and routes containing ads, banner or track, and make your site resilient to missing analytics scripts.
What this error means
"Client" here means the browser itself, not your server. Content blockers compare every URL against filter lists (EasyList, EasyPrivacy…) and cancel the request before it is sent. Chrome then shows it in red in the console, with a (blocked:other) status in the Network tab. The server receives nothing and shows up in no log. It is not a bug in your code, but it becomes one if your application depends on a blocked script (a gtag() call that crashes) or if one of your own URLs happens to contain a filtered word, such as /api/ads or banner-ad.png.
Common causes
- Ad or tracker blocker: uBlock Origin, AdBlock Plus, Ghostery, Privacy Badger, or the built-in protection of Brave, Opera, Firefox.
- Analytics or ad script: Google Analytics, Tag Manager, Meta pixel, Hotjar, AdSense are blocked by design.
- Unlucky file or route name:
ads.js,/advertisement/,/banner/,/track,/analytics,social-share.js, CSS classes like.ad-bannerhidden by cosmetic filtering. - Security or corporate extension: antivirus, parental control extension or browser policy filtering some domains.
Step-by-step fix
-
Confirm it is an extension
Open the page in a private window (extensions are disabled there by default) or turn off blockers for this site. If the error disappears, it is confirmed.
-
Find the blocking rule
In uBlock Origin, open the panel > "More" > the logger: it shows every blocked request and the responsible filter. You then know which word of the URL is the problem.
-
Rename your own files and routes
For your legitimate resources, avoid filtered words in paths, file names and CSS classes. For example
/api/adsbecomes/api/campaignsandbanner-ad.pngbecomeshero-promo.png.grep -rniE "(/|\b)(ads?|advert|banner|track(ing)?|analytics)[/._-]" src/ public/ --include=*.{js,ts,vue,jsx,tsx,html,css} -
Make the site resilient to a blocked script
Never make an essential feature (form, payment, navigation) depend on a third-party analytics script. Call it optionally and do not block the action if it is missing.
function track(event, params = {}) { try { window.gtag?.('event', event, params); } catch { // analytics unavailable: ignore } } form.addEventListener('submit', () => { track('sign_up'); // the form keeps working even if gtag is blocked }); -
For audience metrics: respect the choice
Visitors who block tracking chose to: do not try to get around their blocker. If you need basic statistics, use your server logs or a self-hosted analytics solution on your domain, with the consent required by the GDPR.
Did this fix work for you?
Confirm it in one click: it will rise for the next developers stuck on the same error.
Keep it from coming back
- Test your site with a blocker turned on (uBlock Origin) before each release.
- Pick neutral names for files, API routes and CSS classes of promotional areas.
- Load third-party scripts with
asyncand isolate them: their absence must never break the rest of the page.
Frequently asked questions
Is my server down?
No. The request was cancelled in the browser before being sent: your server never received it. Visitors without a blocker do not have the problem.
What does ERR_BLOCKED_BY_CLIENT.Inspector mean?
An internal DevTools request (often to Google resources) blocked by an extension. It has nothing to do with your site and you can ignore it.
Why do only some users report a button that does not work?
They are probably the ones with a blocker, and your code waits for a blocked third-party script or calls a filtered URL. Reproduce with uBlock Origin on and make that code optional.
Useful tools for this error
More Web, HTML & CSS errors
- Fix "Mixed Content: … requested an insecure resource" (HTTPS mixed content)
- Fix "Refused to apply style … MIME type ('text/html') is not a supported stylesheet MIME type"
- Fix "Failed to load module script: Expected a JavaScript module script … MIME type of text/html" (Vite, SPA)
- Fix "Refused to execute inline script because it violates the following Content Security Policy directive"
- Fix ERR_TOO_MANY_REDIRECTS "redirected you too many times" (redirect loop)
- Fix "Your connection is not private" NET::ERR_CERT_DATE_INVALID and ERR_CERT_AUTHORITY_INVALID
- Fix "ResizeObserver loop completed with undelivered notifications"