How Do Ad Blockers Work? Filters, DNS and Page Cleanup
Learn how ad blockers filter requests, hide page elements and use DNS. Understand blank ad spaces, video ads, filter lists and common limitations.

Kayla
Quetta Networks

Ad blockers work by matching requests or page elements against rules, then blocking or hiding the matches. Browser blockers can filter resources and change what a page displays. DNS blockers act earlier, at domain lookup. These methods have different visibility, so they do not remove the same ads or leave the same results.
Understanding the difference helps explain three familiar experiences: an advertisement disappears but leaves a blank space; ads remain inside an app; or a page stops working after a filter update.
What happens when a page loads?
Imagine a news page with an article, a banner and a video player. This is an illustrative example, not a test of a particular website.
The browser retrieves the page and requests additional resources: images, styles, scripts and media. Some resources come from the publisher; others may come from advertising or analytics services. An ad blocker can act on those requests or on the page elements they create.
Filtering method | What it examines | Example result | Main boundary |
|---|---|---|---|
DNS filtering | Requested domain names | A known advertising domain does not resolve normally | Cannot select one element or URL path within a domain |
Network request filtering | Requests visible to the blocker and its rules | An advertising script or image request is blocked | Depends on available browser APIs and matching rules |
Cosmetic filtering | Matching elements in the webpage | An empty banner container is hidden | Hiding an element does not prove its request was blocked |
Script-based filtering | Supported page behavior | A specific unwanted behavior is modified | Rules and browser support determine what is possible |
AdGuard's documentation explains the distinction between network rules and cosmetic rules, including how browser-level filtering can affect both requests and page appearance. AdGuard filtering documentation
How do filter lists identify ads?
Filter lists contain rules that a blocking engine interprets. Rules may identify a domain, a request pattern or an element on a particular website. Exceptions can permit a resource that a broader rule would otherwise block.
A list is not the same thing as the blocker. The list supplies instructions; the engine decides which supported instructions apply. Two tools using a similarly named list can still behave differently because their engines, permissions and supported rule types differ.
Lists also change as websites change. A rule that worked yesterday may no longer match a redesigned page. Adding every available list is not a reliable fix: overlapping rules can complicate diagnosis and introduce false positives. AdGuard describes filters as a core part of the blocking process. How ad blocking is done
Why does an ad disappear but leave a blank space?
A blocked advertisement and its page container are different objects. A request filter may stop the banner image while the site's layout still reserves space for it. A cosmetic rule can hide the remaining container if the blocker has a suitable rule and access to the page.
In the example news page, blocking the banner request might remove the image but leave an empty rectangle above the article. Hiding the rectangle changes the layout. Neither observation, by itself, measures every kind of tracking on the page.
This is why a screenshot and a blocked-request count answer different questions. One shows the visible result; the other describes activity recorded by a particular tool.
How does DNS ad blocking differ?
DNS filtering makes decisions about domain names. A filtering resolver can refuse or alter an answer for a domain associated with advertising or tracking. This can affect requests from multiple apps that use that resolver, without needing an extension inside each browser.
However, DNS does not see the layout of a webpage. It cannot hide the empty rectangle in our example. It also cannot reliably separate an advertisement from wanted content when both depend on the same domain. AdGuard DNS documents these domain-level capabilities and limits. DNS filtering
For setup rather than theory, use the separate AdGuard DNS guide for Android.
Why do some video or in-app ads remain?
The first question is where the ad appears. A browser extension operates in its supported browser; it does not automatically control a separate video or game app. A website can also change its player, requests or page structure, so a rule may need updating.
Do not assume that a blocker has failed everywhere because one format remains. Record the location and behavior: a banner on a website, a promotion inside a feed, a pre-roll in a browser player, or an ad in a separate app. These are different filtering problems.
If your Android setup already works on some pages, follow the targeted guide to an ad blocker that is not working on Android before replacing the entire setup.
Can an ad blocker break a website?
Yes. A rule may match something the site also needs for a menu, sign-in or player. Blocking a shared resource can remove more than the unwanted content.
Try a temporary exception for one trusted site, reload and repeat the same action. If the function returns, the result is evidence that filtering affected it; it does not identify the exact rule. Our explanation of why ad blockers break websites covers that distinction.
How can you tell whether blocking is working?
Choose a result you can observe. For example: does the banner request stop, does the blank space disappear, and can the video still play?
Compare the same page with one configuration changed at a time. Keep the device, network and other filtering tools consistent. Record functionality as well as appearance. A high score on one test page does not establish effectiveness on every site. Follow the practical guide to testing an ad blocker on Android.
Which filtering approach should you choose?
Choose according to the problem's location and the control you need. Browser filtering suits page-level decisions. DNS filtering suits domain-level rules across traffic that uses the selected resolver. An extension may suit someone who wants a particular tool's controls and has a compatible browser.
For a broader decision, compare Android ad-blocking options. If you prefer filtering managed inside the browser, explore Quetta's built-in ad blocker to see its supported controls and limitations.
Frequently asked questions
Does hiding an ad stop tracking?
Not necessarily. Cosmetic hiding changes what appears on the page. Whether a tracking request was prevented depends on request filtering and the site's behavior.
Are built-in blockers and extensions the same?
Both can provide browser-level filtering, but installation, available controls and compatibility differ. Compare the approaches in built-in ad blockers versus extensions on Android.
Does a larger blocked count mean better protection?
Not by itself. Tools can count differently, and pages make different requests between visits. A useful comparison includes what was blocked, whether unwanted content remained and whether the site still worked.