Cloudflare Docs
Learning Paths
Visit Learning Paths on GitHub
Set theme to dark (⇧+D)

Update local DNS resolver

  2 min read

With a Gateway location created, you have the ability to send traffic to your environment. You can test without risk by changing your DNS resolvers in your browser or network settings.

​​ Change DNS resolver at the network level

To configure your device to send traffic to Gateway:

macOS

macOS DNS Resolver Options
Windows

Windows DNS Resolver Options
Linux

$ cat /etc/resolv.conf
nameserver 172.64.X.X
nameserver 172.64.X.X
iPhone

iPhone DNS Resolver Options
Android

Android DNS Resolver Options

​​ Change DNS resolver in the browser

To configure your browser to send traffic to Gateway:

  1. Obtain your DNS over HTTPS (DoH) address:

    1. Go to Gateway > DNS Locations.
    2. Select the default location.
    3. Copy your DNS over HTTPS hostname: https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query
  2. Follow the configuration instructions for your browser:

    Mozilla Firefox
    1. In Firefox, go to Settings.
    2. In the General menu, scroll down to Network Settings.
    3. Select Settings.
    4. Select Enable DNS over HTTPS.
    5. In the Use Provider drop-down menu, select Custom.
    6. In the Custom field, enter https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query.
    7. Select OK.
    Google Chrome
    1. In Chrome, go to Settings > Privacy and security > Security.
    2. Scroll down and turn on Use secure DNS.
    3. Select With Custom.
    4. In the Enter custom provider field, enter https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query.

    Read more about enabling DNS over HTTPS on Chrome.

    Microsoft Edge
    1. In Microsoft Edge, go to Settings.
    2. Select Privacy, Search, and Services, and scroll down to Security.
    3. Turn on Use secure DNS.
    4. Select Choose a service provider.
    5. In the Enter custom provider field, enter https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query.
    Brave
    1. In Brave, go to Settings > Security and Privacy > Security.
    2. Turn on Use secure DNS.
    3. Select With Custom.
    4. In the Enter custom provider field, enter https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query.
    Safari
    As of today, Safari does not support DNS over HTTPS.
  3. Verify that third-party firewall or TLS decryption software does not inspect or block traffic to the DoH endpoint: https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query.

​​ More locations

To configure your router or OS, or to add additional DNS endpoints, refer to DNS locations.