# 🚫 Block Ads in Desktop Apps — Windows Firewall + DNS + Hosts File Guide

**URL:** <https://onehack.st/t/block-ads-in-desktop-apps-windows-firewall-dns-hosts-file-guide/318063>\
**Category:** Tutorials & Methods\
**Tags:** privacy, tips-tricks, windows\
**Created:** [February 6, 2026, 2:41pm UTC](https://onehack.st/t/block-ads-in-desktop-apps-windows-firewall-dns-hosts-file-guide/318063 "2026-02-06T14:41:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![premiumvpnshield](https://onehack.st/user_avatar/onehack.st/premiumvpnshield/32/170218_2.png) [@premiumvpnshield](https://onehack.st/u/premiumvpnshield)\
**Post date:** [February 6, 2026, 2:41pm UTC](https://onehack.st/t/block-ads-in-desktop-apps-windows-firewall-dns-hosts-file-guide/318063/1 "2026-02-06T14:41:42Z")

</div>

# 🛡 System-Wide Ad Blocking on Windows — Firewall, DNS, Hosts, Apps

Free apps showing ads? Kill the revenue stream. Here’s how.

* * *

Many “free” apps don’t need internet to function — they just need it to show you ads. Block that connection = ad-free experience. For apps that DO need internet, use DNS-level blocking or system-wide ad blockers.

* * *

> **🔥 Method 1: Windows Firewall (Best for Offline Apps)**
>
> **Works on:** Apps that don’t need internet to function (media players, PDF readers, utilities)
> 
> | Step | Action |
> | --- | --- |
> | 1 | `Win + S` → type “Windows Defender Firewall” → Open |
> | 2 | Click **Advanced settings** (left sidebar) |
> | 3 | Click **Outbound Rules** → **New Rule…** (right sidebar) |
> | 4 | Select **Program** → Next |
> | 5 | Browse to app’s `.exe` file → Next |
> | 6 | Select **Block the connection** → Next |
> | 7 | Check all boxes (Domain, Private, Public) → Next |
> | 8 | Name it (e.g., “Block WPS Ads”) → Finish |
> 
> **Repeat for Inbound Rules** if needed (same steps, different sidebar).
> 
> **Find the .exe:** Right-click app shortcut → Properties → copy Target path
> 
> **Common ad-showing apps to block:**
> 
> - uTorrent, BitTorrent clients
> - WPS Office, LibreOffice alternatives
> - Media players (GOM, VLC knockoffs)
> - PDF readers, screenshot tools
> - Printer software (Epson, HP, Canon)

> **📝 Method 2: Hosts File Blocking (System-Wide)**
>
> **How it works:** Redirect ad domains to nowhere (0.0.0.0)
> 
> **Location:** `C:\Windows\System32\drivers\etc\hosts`
> 
> **Quick setup:**
> 
> 1. Open Notepad **as Administrator**
> 2. File → Open → navigate to path above
> 3. Add lines like: `0.0.0.0 ads.example.com`
> 4. Save → Restart browser
> 
> **Better: Use pre-made blocklists:**
> 
> | Source | Domains Blocked | Link |
> | --- | --- | --- |
> | **StevenBlack** | 78,000+ | [github.com/StevenBlack/hosts](https://github.com/StevenBlack/hosts) |
> | **someonewhocares** | 14,000+ | [someonewhocares.org/hosts](https://someonewhocares.org/hosts/) |
> | **MVPS** | 10,000+ | [winhelp2002.mvps.org](https://winhelp2002.mvps.org/hosts.htm) |
> 
> **Auto-updater for Windows:** [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate)
> 
> ⚠ Some Microsoft domains trigger Windows Defender if blocked — stick to ad domains only.

> **🌐 Method 3: DNS-Level Blocking (Works Everywhere)**
>
> **Best for:** Apps that NEED internet but still show ads (VPNs, streaming, games)
> 
> **Change Windows DNS to an ad-blocking DNS:**
> 
> | Provider | DNS (Primary) | What It Blocks |
> | --- | --- | --- |
> | **Mullvad** (recommended) | `194.242.2.3` | Ads + Trackers |
> | **Mullvad Extended** | `194.242.2.4` | Ads + Trackers + Malware |
> | **AdGuard** | `94.140.14.14` | Ads + Trackers |
> | **Quad9** | `9.9.9.9` | Malware (not ads) |
> | **NextDNS** | Custom | Customizable |
> 
> **Setup:**
> 
> 1. `Win + I` → Network & Internet → Change adapter options
> 2. Right-click your connection → Properties
> 3. Select IPv4 → Properties
> 4. “Use the following DNS” → Enter DNS above
> 5. OK → Close
> 
> **Or use DNS-over-HTTPS in browser:**
> 
> - Chrome/Edge: Settings → Privacy → Use secure DNS → Custom → `https://adblock.dns.mullvad.net/dns-query`

> **🛡️ Method 4: System-Wide Ad Blockers (Nuclear Option)**
>
> **Desktop apps that block ads in ALL applications:**
> 
> | Tool | Price | Notes |
> | --- | --- | --- |
> | **[AdGuard for Windows](https://adguard.com)** | $30/lifetime | Best overall, blocks in apps + browsers |
> | **[AdLock](https://adlock.com)** | $22/year | Lightweight, good for games |
> | **[AdBlocker Ultimate](https://adblockultimate.net/windows)** | Free tier | System-wide blocking |
> | **[Blokada](https://blokada.org)** | Free | Open-source, works on desktop too |
> 
> **These work at system level** — ads blocked in games, apps, browsers, everything.

> **⚡ Quick Decision Guide**
>
> | Situation | Best Method |
> | --- | --- |
> | App works offline, just shows ads | **Firewall block** (Method 1) |
> | Want system-wide protection | **Hosts file** (Method 2) |
> | App needs internet but has ads | **DNS blocking** (Method 3) |
> | Want zero effort, pay once | **AdGuard app** (Method 4) |
> | Free VPN tier with ads | **DNS + hosts combo** |

* * *

**Pro tip:** Layer methods for maximum blocking. Firewall + DNS + hosts file = almost nothing gets through.

* * *

Free software without the ad tax. Your bandwidth, your rules.
