Cloudflare One

SDNS, encrypted DNS setup for Cloudflare Gateway

SDNS takes the DNS over HTTPS endpoint of a Cloudflare Zero Trust (Gateway) DNS location and produces the settings each device needs to send its DNS queries there encrypted, from an SDNS stamp for UniFi gateways to a configuration profile for Apple devices, for teams that want Gateway DNS filtering without installing the Cloudflare One client everywhere.

What it does

Create a DNS location in Cloudflare Zero Trust, turn on DNS over HTTPS (and DNS over TLS for Linux), and paste its endpoint into SDNS once. The guide for each device then fills itself in:

  • UniFi gateways: the SDNS stamp to add as a custom encrypted DNS server, with options for the declared resolver properties, a fixed address and certificate hashes.
  • Linux: the systemd-resolved settings for DNS over TLS, and how to keep DHCP-provided DNS servers out.
  • Windows 11 and Windows Server 2022 or later: a PowerShell script that switches every connected adapter to DNS over HTTPS, with commands to check and undo it.
  • iPhone, iPad and Mac: a configuration profile to download, optionally switched off on the Wi-Fi networks you list.

The stamp and the commands are built in your browser. The server only looks up the endpoint’s addresses and builds the Apple profile. For scripts, a small API returns the stamp (/api/stamp), the endpoint’s addresses (/api/resolve) and the profile (/profile.mobileconfig).

When it helps

  • Offices and sites with devices that cannot run the Cloudflare One client: printers, cameras, IoT, guest devices.
  • Laptops, servers and phones where you want Gateway DNS filtering without deploying the full client.
  • Small teams that want Cloudflare DNS filtering at the network edge without extra hardware.

Getting it

Talk to us and we help you set up Zero Trust DNS filtering across your sites and devices.

Independent tools built by Noraina, a Cloudflare Authorized Service Delivery Partner. Not made or operated by Cloudflare. Cloudflare is a trademark of Cloudflare, Inc.

Frequently asked questions

Why do UniFi gateways need an SDNS stamp?

UniFi gateways accept custom encrypted DNS servers as SDNS stamps, a compact sdns:// string that describes the resolver. Cloudflare Zero Trust gives you a DNS over HTTPS URL, so it has to be converted before UniFi can use it. SDNS does the conversion and shows what each byte of the stamp contains.

How do I make an iPhone, iPad or Mac use Cloudflare Gateway DNS without the Cloudflare One client?

Install a configuration profile (a .mobileconfig file) that contains the DNS over HTTPS endpoint of your Gateway DNS location. SDNS builds the profile from the endpoint and can leave encrypted DNS off on the Wi-Fi networks you name. On an iPhone or iPad, the profile has to be downloaded in Safari on the device itself.

Can Windows send DNS queries to Cloudflare Gateway over HTTPS?

Windows 11 and Windows Server 2022 or later can, once the location's addresses are registered as known DNS over HTTPS servers and set on each network adapter. SDNS generates a PowerShell script that does both with no fallback to plain DNS, plus the commands to check and undo it. Windows 10 cannot encrypt DNS system-wide, so the endpoint has to be set in the browser instead.

How do I use Cloudflare Gateway DNS over TLS on Linux?

On distributions with systemd 247 or later, systemd-resolved speaks DNS over TLS without installing anything. SDNS gives you the resolved.conf lines for your location, with each server address and its TLS hostname, and the steps to stop the network's own DNS servers from being used instead.

What do I get by sending a network's DNS to Cloudflare Zero Trust?

Every device covered, including ones that cannot run the Cloudflare One client, has its DNS queries filtered by your Cloudflare Gateway policies, logged in your Cloudflare account and encrypted on the way.