Skip to main content

Windows

Add the following into the file C:\Windows\System32\drivers\etc\hosts:

1.1.1.1 cloudflare-dns.com
1.0.0.1 cloudflare-dns.com
2606:4700:4700::1111 cloudflare-dns.com
2606:4700:4700::1001 cloudflare-dns.com

Create directory and config file with CMD (Run as administrator):

mkdir C:\Windows\System32\config\systemprofile\.cloudflared

echo proxy-dns: true > C:\Windows\System32\config\systemprofile\.cloudflared\config.yml
echo proxy-dns-upstream: >> C:\Windows\System32\config\systemprofile\.cloudflared\config.yml
echo - https://cloudflare-dns.com/dns-query >> C:\Windows\System32\config\systemprofile\.cloudflared\config.yml
echo proxy-dns-address: "::" >> C:\Windows\System32\config\systemprofile\.cloudflared\config.yml
echo proxy-dns-port: 53 >> C:\Windows\System32\config\systemprofile\.cloudflared\config.yml

Copy cloudflared.exe to directory C:\Windows\System32\config\systemprofile\.cloudflared.

Run the following commands in CMD (Run as administrator):

cd C:\Windows\System32\config\systemprofile\.cloudflared
cloudflared service install
net start cloudflared

To get Windows to use the DNS over HTTPS server, you need to change the networking settings in Windows.
Set DNS in IPV4 to 127.0.0.1:


Set DNS in IPV6 to ::1:


Test DNS server with CMD command:

nslookup cloudflare.com