Comprehensive guide to eliminating ads on Windows 10 and 11 using browser extensions, hosts file, DNS, and system-wide methods.
Windows is the most widely used desktop operating system in the world, and Microsoft has increasingly injected advertising into the operating system itself — from Start menu recommendations and lock screen “tips” to Edge browser pop-ups and notification suggestions. Combined with web ads, in-app ads, and tracking scripts, Windows users face more advertising touchpoints than users of any other platform.
The good news is that Windows also offers the most powerful ad-blocking tools available on any platform. You have access to the strongest browser extensions (uBlock Origin), a fully editable hosts file, advanced DNS configuration, PowerShell automation for bulk changes, and system-wide network filtering tools. This guide covers every method, from quick browser-based solutions to comprehensive system-level blocking.
Whether you are running Windows 10 or Windows 11, a desktop PC or a laptop, this guide will help you create a clean, ad-free, privacy-respecting computing environment. Every method is tested on real hardware running the latest Windows builds.
Quick win: Install uBlock Origin in your browser. It takes one click and blocks 99%+ of web ads instantly. Then follow the Windows privacy settings section to disable OS-level ads.
Microsoft Edge is the default browser on Windows and is based on Chromium. It supports the same extension ecosystem as Chrome, which means you can install powerful ad blockers directly from the Edge Add-ons store.
Click the three-dot menu in Edge → Extensions → Get extensions for Microsoft Edge.
Search for “uBlock Origin” and click “Get.” Confirm the installation when prompted.
Click the Extensions icon (puzzle piece) in the toolbar and pin uBlock Origin. Click the icon to verify it is active.
Manifest V3 impact: Like Chrome, Edge is transitioning to Manifest V3 which limits ad-blocker capabilities. For the strongest ad blocking on Windows, consider switching to Firefox.
Google Chrome remains the most popular browser on Windows. Installing uBlock Origin from the Chrome Web Store is the fastest path to ad-free browsing.
Navigate to chrome.google.com/webstore and search “uBlock Origin.”
Click “Add to Chrome” → “Add Extension.” uBlock Origin is now active.
Click the uBlock Origin icon → Dashboard → Filter Lists. Enable additional lists under “Annoyances” to block cookie consent dialogs and social media embeds.
Firefox on Windows provides the strongest ad-blocking experience of any browser. Mozilla has committed to maintaining full support for Manifest V2 extensions, which means uBlock Origin runs at full power on Firefox without the limitations Google is imposing on Chrome and Edge.
If ad blocking is your priority, Firefox + uBlock Origin is the undisputed best combination on Windows.
Download Firefox from mozilla.org if not already installed.
Open Firefox → Menu → Add-ons and Themes → search “uBlock Origin” → Add to Firefox.
Go to Firefox Settings › Privacy & Security → set Enhanced Tracking Protection to “Strict.”
The Windows hosts file maps domain names to IP addresses at the OS level. By mapping ad domains to 0.0.0.0, you block those domains across all browsers and applications on your system.
# Open hosts file in Notepad (as Admin)
notepad C:\Windows\System32\drivers\etc\hosts
# Add ad-blocking entries:
# 0.0.0.0 ads.google.com
# 0.0.0.0 pagead2.googlesyndication.com
# 0.0.0.0 ad.doubleclick.net
# 0.0.0.0 analytics.google.com
# Save and flush DNS:
ipconfig /flushdns
# Download Steven Black's unified hosts (170K+ blocked domains)
$hostsUrl = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
$hostsPath = "$env:SystemRoot\System32\drivers\etc\hosts"
# Backup current hosts
Copy-Item $hostsPath "$hostsPath.backup" -Force
# Download and install
Invoke-WebRequest -Uri $hostsUrl -OutFile $hostsPath
# Flush DNS cache
ipconfig /flushdns
# Count blocked domains
$count = (Get-Content $hostsPath | Select-String "0.0.0.0" | Measure-Object).Count
Write-Host "Blocking $count ad domains"
Important: You must run Notepad, PowerShell, or your text editor as Administrator to modify the hosts file. Some antivirus software may flag hosts file modifications.
Changing your Windows DNS settings to use an ad-blocking DNS provider is an effective system-wide solution that works across all browsers and many apps.
Go to Settings › Network & Internet › Wi-Fi or Ethernet › Hardware Properties › DNS Server Assignment › Edit.
Switch from “Automatic” to “Manual.” Enable IPv4. Set Preferred DNS to 94.140.14.14 (AdGuard) and Alternate DNS to 94.140.15.15.
Open PowerShell and run:
ipconfig /flushdns
AdGuard for Windows is a full-featured ad blocker that filters all network traffic at the system level. It blocks ads in all browsers (without extensions), in desktop apps, in games, and in Windows system components. It includes HTTPS filtering, a customizable filter engine, and parental controls.
Running Pi-hole on a Raspberry Pi or in a Docker container on your network provides DNS-level ad blocking for all devices, including your Windows PC. Once set up, it protects every device on your network automatically.
Windows 10 and 11 serve various forms of advertising within the operating system itself. Disabling these is essential for a clean Windows experience:
Go to Settings › Personalization › Start and toggle off “Show suggestions occasionally in Start” (Windows 10) or “Show recommendations” (Windows 11).
Navigate to Settings › Personalization › Lock Screen. Change background from “Windows Spotlight” to “Picture” or “Slideshow.” Toggle off “Get fun facts, tips, tricks, and more on your lock screen.”
Go to Settings › System › Notifications and toggle off “Get tips and suggestions when using Windows” and “Show me the Windows welcome experience.”
Navigate to Settings › Privacy & Security › General and toggle off “Let apps show me personalized ads by using my advertising ID.”
Go to Settings › Privacy & Security › Diagnostics & Feedback and set to “Required diagnostic data only.” Toggle off “Tailored experiences.”
Automate privacy and ad-blocking configurations using PowerShell:
# Disable Advertising ID
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled" -Value 0
# Disable Start Menu suggestions
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Value 0
# Disable lock screen tips
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "RotatingLockScreenOverlayEnabled" -Value 0
# Disable Get tips notifications
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SoftLandingEnabled" -Value 0
Write-Host "Windows advertising features disabled"
Configure your router to use ad-blocking DNS (AdGuard DNS: 94.140.14.14 / 94.140.15.15) or deploy Pi-hole/AdGuard Home on your local network. This protects your Windows PC along with every other device on your network.
ipconfig /flushdns after every changenetsh to set DNS permanently via command line| Method | Blocks Web Ads | Blocks App Ads | Blocks OS Ads | Difficulty |
|---|---|---|---|---|
| Browser Extension | ✅ Yes | ❌ No | ❌ No | Beginner |
| DNS Configuration | ✅ Yes | ✅ Partial | ❌ No | Beginner |
| Hosts File | ✅ Yes | ✅ Yes | ❌ No | Intermediate |
| Windows Settings | ❌ No | ❌ No | ✅ Yes | Beginner |
| AdGuard for Windows | ✅ Yes | ✅ Yes | ❌ No | Beginner |
| Pi-hole (Network) | ✅ Yes | ✅ Partial | ❌ No | Advanced |
Reputable hosts files are careful not to block Microsoft update domains. Always use a well-maintained, community-reviewed hosts file, and keep a backup of the original.
Yes, partially. The Windows privacy settings above disable most OS-level advertising. However, some Microsoft promotions (like OneDrive upsells) are deeply integrated and harder to completely eliminate without third-party tools.
Both have advantages. DNS blocking is easier to set up and maintain. Hosts file blocking works even when your DNS provider is unreachable and has zero network latency. For maximum coverage, use both simultaneously.
Browser-based ad blocking has zero impact on gaming. DNS and hosts file blocking may occasionally interfere with free-to-play games that use ad-serving domains for rewarded ads. If a game breaks, whitelist its domains.