DNS blocking can stop a Windows PC from connecting to domains flagged for malware or phishing. For a simple setup without an account, use Cloudflare's malware-filtering addresses, 1.1.1.2 and 1.0.0.2, as your DNS servers.
These steps add filtering to your own PC. If you're trying to open a legitimate site that's already blocked, adding a filter won't solve that problem.
If a wanted site stops working afterward, the final sections explain how to check the filter and restore your previous settings.
In this guide
Choose the block you want before changing Windows
DNS finds the address an app needs when it requests a domain name. A filtering DNS service blocks selected names. It can block a whole domain, but it doesn't inspect every picture, message, or download on a website.
Use 1.1.1.2 with 1.0.0.2 for malware filtering. For malware and adult-content filtering together, use 1.1.1.3 with 1.0.0.3. The ordinary 1.1.1.1 and 1.0.0.1 pair doesn't add these filters.
Cloudflare's Families setup instructions list both profiles and their test domains. Pick one profile and use its matching pair.
If the alternate server doesn't filter, requests that reach it can get through without the block you chose.

Write down your current DNS settings first, including whether they're set to automatic. Have your IT administrator handle changes on a managed PC, because internal names can need the organization's DNS servers.
This method doesn't create your own list of individual blocked websites. It uses the provider's categories.
For an advertising filter instead, the AdGuard DNS setup covers a different service and its filtering choices.
Set filtered DNS in Windows 11
Open Settings > Network & internet. Select the connection you actually use: Ethernet for a cable, or Wi-Fi and the connected network's properties for wireless. Find DNS server assignment and select Edit.
Change Automatic (DHCP) to Manual, then enable IPv4. Put 1.1.1.2 in the preferred DNS field. Use 1.0.0.2 for the alternate. For the adult-content profile, use the matching addresses ending in .3 instead.

If your connection uses IPv6, set its DNS servers too. For malware filtering, enter 2606:4700:4700::1112 and 2606:4700:4700::1002. For malware plus adult content, use 2606:4700:4700::1113 and 2606:4700:4700::1003.
Select Save. Keep the PC's IP address assignment as it was. Changing DNS doesn't require inventing a static IP address, gateway, or subnet mask, and changing those unnecessarily can disconnect the PC.
Only the connection you edited gets these DNS values. If you configure Wi-Fi and later plug in Ethernet, check the Ethernet adapter separately. Setting up one laptop also doesn't change the DNS service used by every phone in the house.
Use the adapter properties in Windows 10
Open Settings > Network & Internet > Change adapter options. Right-click your active Wi-Fi or Ethernet connection and select Properties. Select Internet Protocol Version 4 (TCP/IPv4), then Properties.
Choose Use the following DNS server addresses. Enter the preferred and alternate IPv4 addresses for your chosen profile, then select OK. Leave the IP address section unchanged.
Back in the adapter properties, select Internet Protocol Version 6 (TCP/IPv6) and open Properties. Enter the matching IPv6 DNS pair if you use IPv6, and confirm with OK. Close the remaining properties window.
Microsoft's network settings reference explains automatic and manual addressing.
The DNS addresses choose your filter. Your PC's own IP address is a separate setting.
When you return to automatic DNS later, restore that choice for both IPv4 and IPv6 if you changed them. Don't leave a manual IPv6 filter in place while expecting the automatic IPv4 setting to remove all filtering.
Check the block with a harmless test domain
After saving, open https://malware.testcategory.com/ in the browser you normally use. This is the provider's test domain for malware filtering. A working block should prevent the test site from loading normally.
For the malware-and-adult profile, also try https://nudity.testcategory.com/. These are category tests, so you don't need to visit a real malicious or adult website to check your settings.
An ordinary browser error can be the expected result. The filter returns 0.0.0.0 for a classified domain rather than its real address, so a branded warning page isn't required for the block to work.
Also open a normal website you use. Normal browsing should work while the relevant test domain is blocked. If every website fails, normal browsing is broken too. Get normal browsing working again before you check the filter.
Check browsers and VPNs that choose their own DNS
A browser can use its own encrypted DNS provider instead of the Windows choice. While connected, a VPN may supply its own DNS servers. That explains why the same PC can give different results between browsers or with the VPN active.
Check the browser's security or privacy settings for Secure DNS or DNS over HTTPS.
If it selects a different provider, either let it use the system choice or enter the matching filtered service if the browser supports it.
The encrypted address for malware filtering is https://security.cloudflare-dns.com/dns-query. For malware and adult content, it is https://family.cloudflare-dns.com/dns-query.
Encryption protects the DNS request; the service you choose decides which categories get blocked.
Retry the test in the browser you'll actually use. A block in one browser doesn't tell you whether another browser, VPN, or app uses the same DNS servers. I'd check the everyday browser before setting up more devices.
Restore access when a wanted site is blocked
If a legitimate domain stops opening after the change, restore your recorded DNS settings and try that same domain again. If it opens, report the domain through the categorization feedback link on the Families setup page.
If no websites open, check the addresses for typing errors and restore the previous DNS choice.
For connection failures that continue after restoring it, follow the DNS server troubleshooting steps rather than adding more filter addresses.
DNS filtering isn't antivirus and can't stop every harmful page on an otherwise allowed domain. Keep the browser and Windows security protection active.
For custom household restrictions, choose a service or router feature that lets you manage your own rules.
The Short Version
Set the matching filtered addresses on your active connection, including IPv6 if you use it, and try the official test domains. Check browser or VPN DNS separately, and keep the old settings available to restore access.
Checked December 4, 2026.







