santifer/career-ops · info
Blocked request to restricted destination (DNS)
Error message
Blocked request to restricted destination (DNS): ${requestUrl} - ${err.message} What it means
A second layer of the same route guard: after the URL-shape check passes, validateUrlSecurity() performs DNS resolution and rejects hosts resolving to private/invalid addresses. The warning notes a DNS-level block. Crucially, the code treats a host that resolves to nothing as a DEAD THIRD-PARTY SCRIPT rather than evidence about the posting — many live postings reference analytics hosts that no longer exist (measured 78/217 false 'uncertain' verdicts from visitorqueue, AddThis, fluidads, cloudfront).
Solutions
- If the blocked host is a third-party tracker, ignore — the code intentionally treats it as noise, not a liveness signal
- If the posting's own host is blocked, verify DNS on the machine (dig/nslookup) and check /etc/hosts and VPN/split-horizon DNS
- Do NOT downgrade the posting to dead/uncertain because of this warning; the code keeps measuring the posting itself
- If a genuinely public host is misclassified as private, fix the resolver config, not the guard
Defensive patterns
Strategy: fallback
Validate before calling
import { lookup } from 'node:dns/promises';
async function hostResolves(hostname) {
try { await lookup(hostname); return true; } catch { return false; }
}
// treat a dead tracker host as noise, never as a liveness verdict Try / catch
try {
await validateUrlSecurity(requestUrl);
return route.continue();
} catch (err) {
// DNS-dead third-party host: continue with the posting, mark host as ignored
ignoredHosts.add(requestUrl);
return route.abort('blockedbyclient');
} Prevention
- Never let third-party tracker failures (visitorqueue, AddThis, dead CDNs) downgrade posting liveness to uncertain
- Ensure stable DNS on the scanning machine; check /etc/hosts and VPN split-horizon configs
- Maintain an allowlist of known-dead analytics hosts to skip noisy warnings
- Re-measure periodically — tracker hosts die often, as the AddThis 2023 shutdown shows
When it happens
Trigger: The route interceptor awaits validateUrlSecurity(requestUrl) and it throws because the hostname resolves to a private address or fails to resolve at all — typically an embedded analytics/ad script host that has been decommissioned.
Common situations: Live postings loading s7.addthis.com (shut down 2023) or personalisation.visitorqueue.com; ad hosts on dead cloudfront distributions; DNS failure on the scanning machine making everything unresolvable; split-horizon DNS resolving public names to internal IPs.
Related errors
- Access denied: Egress guard blocked private target IP
- Access denied: Egress guard blocked private target IPv6
- Blocked request to restricted destination (DNS)
- Blocked request to restricted destination
- Blocked request to restricted destination
AI-assisted analysis of santifer/career-ops@e7abd431fc (2026-09-16).
Data as JSON: /api/errors/95dc9e618c1db51a.
Report an issue: GitHub.
Appendix: source
Thrown at liveness-browser.mjs:264
}
if (page) {
page._blockedByGuard = null;
}
if (page && typeof page.route === 'function' && !page._routeInterceptorRegistered) {
page._routeInterceptorRegistered = true;
await page.route('**/*', async (route) => {
const requestUrl = route.request().url();
const errGuard = rejectPrivateOrInvalid(requestUrl);
if (errGuard) {
console.warn(`Blocked request to restricted destination: ${requestUrl}`);
page._blockedByGuard = errGuard;
return route.abort('blockedbyclient');
}
try {
await validateUrlSecurity(requestUrl);
return route.continue();
} catch (err) {
console.warn(`Blocked request to restricted destination (DNS): ${requestUrl} - ${err.message}`);
// A host that resolves to nothing is a DEAD THIRD-PARTY SCRIPT, not a
// statement about the posting. Measured 2026-08-14 over a 217-URL
// recheck: 78 live postings were returned as `uncertain` because an
// analytics or ad host on the page no longer exists — 53 on
// personalisation.visitorqueue.com, 17 on s7.addthis.com (AddThis was
// shut down in 2023), the rest on fluidads and cloudfront. One was
// opened by hand to confirm: 11,178 characters of live posting and a
// working apply control, called uncertain because of a dead tracker.
//
// The request is still aborted either way, so the egress guard loses
// nothing. Only the VERDICT stops being poisoned, and only for a
// subresource: if the main document itself cannot resolve, that is a
// real finding about the posting and still counts.
// Whether this was the main document or a subresource can only be asked
// of a real Playwright request. Callers may pass a lighter route double
// (the test suite does, with request() returning just a url()), and for
// those the answer is unknowable — so default to TRUE, which keeps the
// pre-existing behaviour of poisoning the verdict. The relaxation onlyView on GitHub (pinned to e7abd431fc)