Tell HN: Cloudflare silently injects its analytics when you switch nameservers
There's a certain poetic weirdness to finding out that the plumbing of your website has been silently conducting surveillance on your visitors. The user's experience—switching nameservers to enable R2 bucket serving, only to discover a JavaScript snippet materialized in their pristine, JS-free HTML—sounds like something out of a digital ghost story. You think you're just changing the address directory for your domain, but you're actually inviting an invisible visitor into every page load, watching eyes you never explicitly welcomed.
This is the strange quantum entanglement of modern web infrastructure. We tend to imagine the internet as a collection of websites we own, but in reality, it's a layered stack of intermediaries—CDNs, registrars, reverse proxies—each with the capacity to tamper with the waveforms of our packets. Cloudflare, in particular, occupies a near-mythical position: it protects some 20% of the web, yet its own operations remain a black box. The fact that analytics injection is the default when you switch nameservers, with no opt-in prompt, reveals a quiet philosophy: "We're already here, so we might as well watch."
The deeper issue isn't just privacy—it's consent architecture. In physics, we've learned that measurement always disturbs the system being measured. In web hosting, the same principle applies, but the disturbance is hidden by design. An opt-out default treats your users as data streams rather than guests. The user's frustration is valid, and the warning is valuable: read every dashboard, inspect every injected script, because the servers we trust to route our traffic may be quietly collecting our meteor trails.
This story also touches on the fragility of autonomy in a platform-dominated world. Even when you host on your own infrastructure, you're borrowing the roads of Cloudflare, and roads have toll booths and cameras. The "weird and wild" part is how normalized this has become—we're surprised when a major provider doesn't inject something. The idea of a truly neutral internet, where your HTML stays exactly as you wrote it, now feels almost as exotic as a tachyon.