Quick answer

How does DNS filtering work?

It checks each domain your device looks up against threat intelligence, and refuses to resolve known malicious ones. The connection never starts, so the page doesn't load. It can stop just the domains that are already known or flagged, and traffic that goes straight to an IP address skips it. A VPN encrypts your connection; DNS filtering looks at where it's going.

What DNS filtering does and doesn't stop
ThreatDoes DNS filtering help?
Known phishing domainsYes. The lookup is blocked, so the page doesn't load.
Known malware and command-and-control domainsYes, when the domain is already known.
A brand-new domain nobody has reportedNot always. No list catches every new site.
Malware that connects straight to an IP addressNo. That traffic skips DNS.
A malicious file already on your deviceNo. That's a job for antivirus.
DNS filtering shield blocking malicious domains on a circuit board network, CyberFence green cyber visualization

Every time you visit a website, your device sends a DNS query — a request to translate a domain name like example.com into an IP address your browser can connect to. That translation happens in milliseconds, before any content loads, before any connection is made. It is also one of the most exploited moments in cybersecurity.

DNS filtering checks the domain names your device looks up and refuses to resolve the ones known to be malicious. The NSA and CISA call this Protective DNS, and their joint guidance, Selecting a Protective DNS Service, says it addresses phishing, malware distribution, command and control, and domains generated by malware to get around static blocklists. This article explains how it works, why VPN encryption alone doesn't cover the same gap, and how the two fit together.

What Is DNS and Why Does It Matter for Security?

DNS stands for Domain Name System. It is the internet's phonebook — converting human-readable domain names into the IP addresses that servers use to route traffic. When you type a URL into your browser, your device first asks a DNS resolver: "What is the IP address for this domain?"

The security implication is straightforward: if your device asks for the address of a malicious domain, it is already headed toward that threat. NSA and CISA note that attackers use domain names across an attack: lookalike domains people land on by mistyping, malicious links in phishing emails, malware checking in with a command-and-control server, and data sent out to a remote host. Blocking the lookup of a known-bad domain stops that connection before it starts. It doesn't help when malware connects straight to an IP address, because that skips DNS.

The domain names behind malicious content are often known or knowable, according to the NSA and CISA guidance, which is why blocking them at the lookup works. It adds that some services also try to spot new malicious domains by their patterns. Even so, no blocklist catches everything.

See Web Shield block a known malicious site.

If a link points you at a known phishing or malicious site, Web Shield blocks it before the page loads while CyberFence is connected. Here it is in under a minute.

Watch the Web Shield film

Select play to load YouTube, then start the film in the player. YouTube processes data when loaded; its privacy policy applies.

Watch on YouTube (opens a new tab)

Read the video transcript

Fake websites can look exactly like the real ones. One wrong link can cost you a password, or put malware on your device.

That's where CyberFence Web Shield comes in. Built by cybersecurity professionals, it turns on with your VPN. No setup needed.

It checks the sites and links you open against CyberFence's own database of known threats. If there's a match, it's blocked. The page never loads, and nothing downloads. Safe sites open as usual.

It works in your apps too: at home, on hotel Wi-Fi, or on mobile data. On iPhone, iPad, Android, Windows and Mac.

CyberFence Web Shield. Malicious sites, blocked. Choose your plan today.

How DNS Filtering Works Step by Step

DNS filtering operates as a layer between your device and the internet, inserted at the DNS resolution stage:

  1. You request a domain. Your device sends a DNS query to resolve a domain name — whether you typed it in, clicked a link, or an app triggered the request automatically.
  2. The query hits the DNS filter first. Instead of going directly to a standard DNS resolver, the query is intercepted by the filtering layer.
  3. The domain is checked against threat intelligence. The filtering service compares the requested domain, and often the IP address it resolves to, against lists of known malicious, phishing and suspicious domains.
  4. Allow or block decision. If the domain is clean, the request proceeds normally and your connection is established. If the domain is flagged, the request is blocked — the connection is never made.
  5. The connection never starts. If the lookup is blocked, your device doesn't connect to that server, so a known-bad page doesn't load. Anything that arrives another way, such as a file you already have, isn't affected.

From your side, a blocked request usually looks like a site that failed to load, or a block page, because the connection never started.

What DNS Filtering Blocks That a VPN Cannot

A VPN encrypts your internet traffic between your device and the VPN server. That helps keep your data private on public networks, hides your IP address from the websites you visit, and keeps your internet provider from reading your traffic while it's connected. Those are real protections.

What a VPN does not do is evaluate the destinations you are connecting to. A VPN with no DNS filtering will happily encrypt your traffic and route it directly to a phishing site, a malware distribution server, or a ransomware command-and-control endpoint. The encryption protects the path. It does nothing about the destination.

DNS filtering looks at the destination. By refusing to resolve known-bad domains, it can stop connections that encryption alone wouldn't. It only works on domains that are already known or flagged as malicious, and traffic that goes straight to an IP address skips it.

This is why the two technologies complement each other. VPN encryption protects the channel. DNS filtering protects the destination. Together they cover fundamentally different attack surfaces.

The Scale of the DNS Threat Problem

Public counts of DNS threats mostly come from security vendors measuring their own customers, so here is what the government guidance says instead:

  • NSA and CISA list the kinds of domains Protective DNS addresses: phishing sites, including typosquats and close lookalikes of common domains, malware distribution and command and control, and domain generation algorithms (NSA and CISA).
  • CISA runs a Protective DNS resolver for federal civilian agencies. When a lookup matches a threat indicator, the service blocks, redirects or sinkholes the response and alerts the agency (CISA).
  • The same guidance warns that Protective DNS is bypassed by traffic that uses IP addresses directly, so it shouldn't be your only defense.
  • Because a DNS filtering provider can see your lookups, NSA and CISA say to understand how the provider uses that data, especially for anything other than security.
  • Malware can generate domain names automatically to get around static blocking, which is why some services look at patterns in domain names, not just known lists.

That last point matters. Attackers can create new domains quickly, and a blocklist can only block what someone has already identified. Pattern-based detection narrows the gap, but no DNS filter catches every new domain.

DNS Filtering vs. Antivirus: Understanding the Difference

Antivirus software operates at the endpoint — it scans files that have already been downloaded or processes that are already running. By the time antivirus software evaluates a threat, the malicious content has already reached your device.

DNS filtering works earlier: before a page loads or a download starts from a known-bad domain. For phishing links and malicious download sites that are already known, there may be nothing left for antivirus to scan. DNS filtering can't see a file that arrives another way, such as from a USB drive or a site that hasn't been flagged.

The two approaches address different points in the attack timeline. DNS filtering handles prevention. Antivirus handles detection and remediation. They should be used together, not treated as alternatives.

How Web Shield Works in CyberFence

Web Shield is CyberFence's protection against known harmful sites. Here is what it does, and what it doesn't:

Blocks known malicious and phishing sites. While the VPN is connected, Web Shield blocks known malicious and phishing sites before the page loads.

Known threats, not all of them. Web Shield can't catch every new site, so a link in an unexpected message still deserves a second look.

Works while you're connected. Web Shield works on home Wi-Fi, hotel Wi-Fi or mobile data whenever CyberFence is connected. It isn't an ad blocker or antivirus.

Family Shield for adult content. If you also want adult content filtered, Family Shield mode adds that on top of Web Shield's blocking of known malicious sites.

Do You Need DNS Filtering if You Are Careful Online?

This is a reasonable question. If you avoid suspicious links and only visit reputable sites, does DNS filtering add meaningful protection?

It can, for two reasons. First, careful people still get fooled. Attackers use lookalike domains, compromised legitimate sites and convincing messages. The NSA and CISA guidance points out that people often mistype a domain name and land on a malicious one instead.

Second, DNS queries are not only generated by your conscious browsing decisions. Apps, browser extensions, operating system processes, and embedded scripts on legitimate websites all generate DNS queries in the background. A malicious ad on a mainstream news site, a compromised JavaScript library, or a software package with a malicious dependency can all trigger DNS connections without you clicking anything. A DNS filter checks the lookups that pass through it, not just the URLs you type.

What to Look for in a VPN with DNS Filtering

Not every VPN that claims DNS protection actually delivers it. Here is what to evaluate:

No DNS leaks. While a VPN is connected, your DNS lookups should travel inside the VPN connection. If they leak outside it, your internet provider and anyone watching the network can see which domains you look up, even though the rest of your traffic is encrypted. Run our DNS leak test to check yours.

Active threat blocking, not just leak prevention. Some VPNs prevent DNS leaks but do not actually block malicious domains. Leak prevention means your queries go through the VPN. Active blocking means malicious domains are evaluated and stopped. You need both.

Threat data that keeps up. A static blocklist falls behind, because attackers keep creating new domains. Ask how the provider keeps its threat data current, and remember that no list is complete.

No logging of DNS queries. A VPN with DNS filtering that logs your DNS queries keeps a record of the sites you visit under a different name. Check that the provider's no-logs policy covers DNS query data. CyberFence publishes its no-logs policy so you can read it yourself.

For more context on evaluating VPN privacy claims, see our guide on how to verify a VPN's no-logs policy and our breakdown of what a VPN does not protect you from. For a deep dive on phishing specifically, see how VPN phishing protection works at the DNS level.

Frequently Asked Questions

What is DNS filtering?

A service that checks the domain names your device looks up and refuses to resolve ones known to be malicious, so the connection never starts.

Does a VPN filter malicious sites on its own?

Not by itself. A VPN encrypts your connection but doesn't judge where it goes. Some VPNs add a blocking feature, like CyberFence's Web Shield.

Can DNS filtering catch every malicious site?

No. It blocks domains already known or flagged, and traffic that goes straight to an IP address skips DNS.

Does DNS filtering replace antivirus?

No. DNS filtering works before a connection starts. Antivirus checks files and programs already on your device. Use both.

When does Web Shield work?

While CyberFence is connected. It blocks known malicious and phishing sites, and it isn't an ad blocker or antivirus.

Read Next

Want to go deeper? Read our free privacy and security tools , the CyberFence DNS leak test , or the CyberFence WebRTC leak checker .