Preventing Windows 11 Client Bypassing Pi-hole: A Networking Solution

Abstract: Resolve Windows 11 clients bypassing Pi-hole by disabling DNS-over-HTTPS and enforcing static DNS via Group Policy.

Created: 2026-08-12 by
Windows 11 clients bypass Pi-hole primarily because the operating system enforces DNS-over-HTTPS (DoH) or uses a secondary DNS provider for resolution when the primary fails. This behavior allows traffic to escape your local ad-blocking sinkhole, undermining network-wide security. To resolve this, you must disable DoH at the OS level and ensure strict static DNS configuration on the network interface. The root cause lies in Windows 11’s aggressive attempt to secure DNS queries by encrypting them via Microsoft’s servers or other public resolvers like Cloudflare. When enabled, these encrypted channels ignore the local Pi-hole IP address assigned to the primary DNS slot. Additionally, Windows may automatically switch to a manual DNS setting if it detects instability, further detaching the client from your local infrastructure. Fixing this requires a combination of GUI settings adjustments and Group Policy enforcement to prevent reversion.

Disable DNS-over-HTTPS in Windows Settings

The most common reason for bypass is the built-in DoH feature. Windows 11 handles this through the Network & Internet settings rather than deep registry edits. You need to navigate to Settings > Network & internet > Advanced network settings. From there, select More network adapter options to open the classic Control Panel view. Right-click your active Ethernet or Wi-Fi adapter and choose Properties. Double-click Internet Protocol Version 4 (TCP/IPv4). Click the Advanced button and go to the DNS tab. Ensure that "Register this connection's addresses in DNS" is unchecked if you are not using dynamic updates, though this is less critical than the main settings. Return to the main Settings window and look for Private networks or Public networks depending on your profile. Under the Additional settings section, find DNS over HTTPS. Set the mode to Off. If the option is grayed out, it indicates that a Group Policy object is already managing this setting, which is the enterprise-grade solution described below. Disabling this forces Windows to use standard, unencrypted DNS queries directed at the IP addresses you specify, allowing Pi-hole to intercept and filter them correctly.

Enforce Static DNS via Group Policy

For environments with multiple machines or users who might change settings, relying on individual GUI configurations is insufficient. Group Policy Objects (GPO) provide a centralized way to lock down DNS settings. Open the Group Policy Management Console on your domain controller. Create a new GPO linked to the organizational unit containing your Windows 11 clients. Edit the policy and navigate to User Configuration > Preferences > Control Panel Settings > Network Connections. Right-click and select New > Advanced TCP/IP Settings. In the dialog box, check the box for Use the following DNS server addresses. Enter your Pi-hole IP as the preferred server and a reliable fallback like 8.8.8.8 or your router’s IP as the alternate. Crucially, uncheck Register this connection's addresses in DNS if you want to avoid cluttering your internal DHCP server records, although keeping it checked is often harmless. Apply the policy and force a refresh on the client using gpupdate /force in an elevated command prompt. This method overrides user changes and ensures the NIC always points to your blocker.

Configure Network Interface Strictly

Even with GPOs, local interface settings can sometimes drift. It is vital to ensure the Network Interface Card (NIC) is not set to obtain DNS automatically via DHCP if your DHCP server is misconfigured. Navigate back to Adapter Properties as described in the previous section. Select Use the following DNS server addresses manually. Enter the Pi-hole IP in the Preferred field. In the Alternate field, enter a second Pi-hole instance if you have one, or a trusted external resolver. Avoid leaving these fields blank, as Windows will then query the DHCP-provided DNS, which might be your ISP’s default gateway if Pi-hole is not integrated into the DHCP scope. If you are using a home lab setup without Active Directory, you can achieve similar results by scripting the network configuration. Use PowerShell to set the DNS servers statically. Run the following command in an administrator terminal, replacing InterfaceIndex with your actual NIC index found via Get-NetIPConfiguration:
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses ("192.168.1.50", "8.8.8.8")
This command hardcodes the DNS servers for that specific interface. To make this persistent across reboots, you can save this script and schedule it via Task Scheduler to run at logon. This approach is particularly useful for standalone PCs where GPO management is not feasible. For more details on handling connectivity issues during such configurations, refer to Troubleshooting LAN Connection Issues on a Brand New Windows 11 Machine.

Verify Resolution and Troubleshooting

After applying these changes, verify that the client is actually using Pi-hole. Open Command Prompt and run nslookup example.comipconfig /flushdns. Check the Windows Event Viewer under Applications and Services Logs > DNS Client for errors indicating registration failures. If the settings revert unexpectedly, check for third-party security software or VPN clients that may be injecting their own DNS providers. These applications often install virtual adapters that capture traffic before it reaches the physical NIC. Disable any unused virtual adapters in the Network Connections panel. Also, ensure that your DHCP server is distributing the correct DNS options. If your DHCP server hands out the Pi-hole IP, Windows 11 should respect it unless DoH is forced on. For deeper insights into why DNS settings might change automatically, see DNS Settings Automatically Changing to Manual on Windows 11 22H2.

Frequently Asked Questions

Why does my Windows 11 PC still bypass Pi-hole after disabling DoH?

You may have a secondary DNS provider configured in the adapter properties that Windows falls back to if the primary fails. Ensure only the Pi-hole IP is listed in the Preferred DNS field and consider removing the Alternate field entirely if you do not need a backup resolver.

Can I enforce DNS settings using only DHCP?

Yes, configuring your DHCP server to hand out the Pi-hole IP as the primary DNS option is the cleanest method. However, Windows 11’s DoH feature can still override this if not disabled in the OS settings, so combining DHCP configuration with local DoH disablement is recommended.

What happens if I leave DNS-over-HTTPS enabled?

Enabling DoH encrypts DNS queries between your PC and Microsoft’s servers, completely bypassing your local Pi-hole. This means ads and trackers will load normally, and you lose all visibility into network traffic logs provided by your ad blocker.

How do I check which DNS server Windows is currently using?

Run ipconfig /all in Command Prompt to see the configured adapters. For real-time verification, use nslookup google.com and observe the server address returned in the response. If it matches your Pi-hole IP, the configuration is working.

Is it safe to disable DoH on a home network?

Disabling DoH on a local network where you control the DNS resolver is generally safe and improves privacy by keeping queries within your infrastructure. It removes the encryption layer, but since the traffic stays on your LAN, the risk of interception is minimal compared to the benefit of ad blocking.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More