Skip to content
Solar Account.
Education & Software

How to Set Up Cloudflare's Secure DNS on Any Device

Configuring Cloudflare's secure DNS resolver (known as 1.1.1.1) is one of the most effective ways to accelerate your web browsing speeds, bypass regional or ISP-based resolution bottlenecks, and enhance your digital privacy by preventing internet service provi...

How to Set Up Cloudflare's Secure DNS on Any Device

Configuring Cloudflare's secure DNS resolver (known as 1.1.1.1) is one of the most effective ways to accelerate your web browsing speeds, bypass regional or ISP-based resolution bottlenecks, and enhance your digital privacy by preventing internet service providers from logging your DNS queries.

Contents

The Domain Name System (DNS) functions as the fundamental phonebook of the internet, translating human-readable domain names into machine-readable numerical IP addresses. Traditional DNS requests sent by your operating system or router are typically unencrypted, exposing your browsing habits to local network administrators, internet service providers (ISPs), and potential on-path eavesdroppers. Cloudflare operates a public recursive DNS service—accessible via primary IPv4 addresses 1.1.1.1 and 1.0.0.1, alongside IPv6 counterparts—that supports modern encrypted protocols such as DNS over HTTPS (DoH) and DNS over TLS (DoT).

By transitioning your hardware to utilize Cloudflare's secure infrastructure, you ensure that your domain name resolutions remain private, authenticated, and fast. The following guide details the technical prerequisites, step-by-step configuration procedures across multiple platforms, operational comparisons, verification methods, and advanced troubleshooting steps required to establish a robust secure DNS architecture.

Understanding Secure DNS Technologies: DoH vs. DoT

Before modifying your network configurations, it is critical to understand the underlying transport mechanisms that secure your DNS queries. Traditional DNS traffic travels over UDP or TCP port 53 in plain text. Cloudflare’s secure DNS infrastructure leverages two primary cryptographic standards to protect data in transit: DNS over HTTPS (DoH) and DNS over TLS (DoT).

DNS over TLS wraps standard DNS queries inside a dedicated TLS (Transport Layer Security) tunnel, typically operating over TCP port 853. This ensures encryption and server authentication, making it easy for network firewalls to identify and selectively block or prioritize DNS traffic based on the port number. Conversely, DNS over HTTPS encapsulates DNS queries inside standard HTTPS traffic operating over TCP port 443—the same port used for secure web browsing. DoH traffic blends seamlessly with normal web traffic, making it significantly harder for local networks to censor or inspect individual DNS requests without disrupting general internet access.

How to Set Up Cloudflare APO | GridPane

Choosing between DoH and DoT depends on your operating system and application requirements. Modern web browsers like Mozilla Firefox and Google Chrome heavily favor DoH for built-in application-level secure DNS resolution. Conversely, modern operating systems like Android, iOS, macOS, and Windows increasingly support system-wide encrypted DNS profiles utilizing either DoH or DoT. Understanding these protocols allows you to select the appropriate configuration method for your specific threat model and hardware environment.

Prerequisites and Verification Before Setup

Implementing secure DNS requires minimal hardware modifications, but verifying your current network state ensures that your new configuration takes effect properly. Before making changes, you should identify your current DNS provider and check whether your system currently leaks queries to your ISP.

To check your current DNS resolver configuration, you can visit specialized diagnostic platforms or execute command-line utilities. On Windows, open PowerShell or Command Prompt and run the following command:

ipconfig /all

Look for the "DNS Servers" entry under your active network adapter. On macOS or Linux terminal environments, you can query your active DNS resolvers using:

scutil --dns

or by checking /etc/resolv.conf. Once you have recorded your baseline settings, note down your primary and secondary IPv4 and IPv6 addresses for Cloudflare:

  • Primary IPv4: 1.1.1.1
  • Secondary IPv4: 1.0.0.1
  • Primary IPv6: 2606:4700:4700::1111
  • Secondary IPv6: 2606:4700:4700::1001

If you intend to use Cloudflare’s security-focused filtering variants—such as malware blocking or adult content filtering—you will substitute these standard IP addresses with the specialized endpoints provided in the feature comparison table below.

Step-by-Step Configuration Across Major Operating Systems

Configuring secure DNS can be accomplished at the device level, ensuring protection wherever you connect, or at the home router level to protect all connected appliances simultaneously.

Configuring Windows 11 and Windows 10

Modern Windows operating systems feature native encrypted DNS support, allowing you to configure DoH directly within the network settings interface without third-party software.

  1. Open the Settings application by pressing Windows + I.
  2. Navigate to Network & internet and select either Wi-Fi or Ethernet, depending on your connection type.
  3. Click on the properties of your active network connection.
  4. Scroll down to the DNS server assignment section and click the Edit button.
  5. Change the setting from Automatic (DHCP) to Manual.
  6. Toggle IPv4 to On and enter 1.1.1.1 as the Preferred DNS and 1.0.0.1 as the Alternate DNS.
  7. If your Windows version and network stack support native encrypted DNS, locate the DNS over HTTPS (DoH) dropdown menu and select Manual template.
  8. Enter the Cloudflare DoH template URI: https://cloudflare-dns.com/dns-query
  9. Click Save to apply the configuration.

Configuring Apple macOS and iOS

Apple platforms support encrypted DNS through configuration profiles or manual settings, depending on the OS version.

  1. Open the System Settings application on macOS or Settings on iOS.
  2. Navigate to Wi-Fi or Network, select your active connection details, and locate the DNS configuration tab.
  3. Remove existing DNS servers and add Cloudflare's primary IPv4 (1.1.1.1) and secondary IPv4 (1.0.0.1) addresses.
  4. For advanced encrypted profile installation on iOS and macOS, download an official mobile config profile or use the Cloudflare 1.1.1.1 app available from the official App Store to automatically install the required secure system resolver profile.

Configuring Home Routers

Setting up Cloudflare DNS on your home router secures every device on your Local Area Network (LAN)—including smart home gadgets, gaming consoles, and legacy hardware that lack native encrypted DNS settings.

  1. Access your router's administration panel by entering its gateway IP address into a web browser (commonly 192.168.1.1 or 192.168.0.1).
  2. Log in using your router administrator credentials.
  3. Locate the WAN, Internet Setup, or Basic Network settings page.
  4. Find the fields designated for DNS Server Addresses and disable automatic assignment by your ISP.
  5. Input Cloudflare’s IPv4 primary and secondary addresses into the static DNS fields.
  6. Save and restart your router to clear local DNS caches across connected endpoints.

Comparing Cloudflare DNS Variants and Filtering Options

Cloudflare offers multiple iterations of its public resolver service tailored to different user requirements, ranging from raw unthrottled resolution to automated threat mitigation and family-friendly content filters.

Variant Name Primary IPv4 Secondary IPv4 Key Feature / Filtering Scope
Standard 1.1.1.1 1.1.1.1 1.0.0.1 Unfiltered, high-speed, zero-logging public DNS resolver.
1.1.1.1 with Malware Blocking 1.1.1.1 1.0.0.1 Automatically blocks known malware domains and phishing threats.
1.1.1.1 for Families 1.1.1.1 1.0.0.1 Blocks both malware and adult content across household devices.

Note: While the base IPv4 addresses are identical across services, routing behavior is determined by the specific secondary IPs or configuration profiles utilized during setup. Review Cloudflare's official documentation for specialized IP endpoints when deploying strict malware or family filtering.

Verifying Your Secure DNS Setup and Resolving Leaks

Once your configuration is saved, verifying that your traffic successfully routes through Cloudflare prevents misconfigurations from leaving your DNS queries exposed. Open a web browser and navigate to an independent diagnostic tool such as Cloudflare's browser diagnostic page or DNSLeakTest.

Run the standard or extended test. The diagnostic output should explicitly display Cloudflare as your detected DNS resolver and confirm that your requests are utilizing encrypted protocols. If your ISP still appears in the test results, common causes include:

  • Cached DNS Records: Your operating system or browser may be serving old IP translations from local caches. Flush your local DNS cache by running ipconfig /flushdns on Windows or sudo killall -HUP mDNSResponder on macOS.
  • Fallback Behavior: Some operating systems automatically fall back to secondary ISP resolvers if the primary encrypted template fails validation or encounters firewall blocks on port 853 or 443. Ensure your manual templates match exact formatting specifications.
  • Active VPN or Proxy Services: Virtual Private Networks often enforce their own proprietary internal DNS resolvers, overriding manual device configurations. Disable your VPN temporarily during diagnostic testing if you wish to verify raw Cloudflare connectivity.

Troubleshooting Common Configuration Errors

Implementing secure DNS can occasionally introduce connectivity anomalies or name-resolution failures if network firewalls restrict specific ports or protocols.

If certain websites fail to load after switching to Cloudflare secure DNS, first verify that you entered the IP addresses or DoH templates without typos. A misplaced period or incorrect character will immediately halt socket connections. Next, check your local firewall or corporate security software. Some enterprise network firewalls inspect or intercept outbound DoH traffic (port 443) or block non-standard DNS ports, forcing connection timeouts.

If you encounter intermittent resolution slowdowns, ensure that your device is not querying distant Cloudflare data centers due to faulty ISP routing. Cloudflare operates anycast routing to direct queries to the nearest exchange point, but peering issues between local ISPs and Cloudflare can occasionally degrade performance. If persistent latency occurs, reverting to standard DHCP settings or toggling between DoH and DoT modes will help isolate whether the bottleneck stems from the cryptographic overhead or local routing paths.

Next Actions and Maintaining Network Privacy

After successfully configuring Cloudflare's secure DNS, ongoing maintenance ensures sustained performance and security across your digital environment. Periodically re-run DNS leak tests after major operating system updates or network adapter replacements, as system updates occasionally reset custom adapter configurations back to default ISP values.

To further harden your network privacy, consider pairing system-wide encrypted DNS with modern browser privacy extensions and a reputable Virtual Private Network, creating a multi-layered defense against surveillance and data collection. For enterprise environments or multi-user households, exploring Cloudflare Zero Trust dashboard configurations allows centralized management of security policies, blocklists, and analytics without managing individual device endpoints manually.

Written by

Jonathan Reed

Cloud & Enterprise IT Correspondent