Onboard DNS for a network
Last updated Oct 12, 2026 The fastest way to start filtering DNS queries is to change your DNS resolver to use a specific Gateway endpoint. You can make this change at the browser, OS, or router level.
Choose this option if:
- You want to try out DNS filtering without installing software.
- You do not need to filter by user identity.
- You want to apply blanket DNS policies to all devices in a physical location, such as a retail store or office.
Change DNS resolver in browser
To configure your browser to send traffic to Gateway:
- Obtain your DNS over HTTPS (DoH) address:
- Go to Gateway > DNS locations.
- Select Add a location.
- Enter a name for the location.
- Turn on Set as Default DNS Location.
- Select Add location.
- Copy your DNS over HTTPS hostname:
https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query - Follow the configuration instructions for your browser:<details><summary>
Mozilla Firefox</summary>
- In Firefox, go to Settings.
- In Privacy & Security, go to DNS over HTTPS.
- Under Enable secure DNS using, select Max Protection.
- In Choose provider, choose Custom.
- In the field, enter <code>https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query</code>.
Firefox is now configured to use your DoH endpoint. For more information on configuring DoH settings in Firefox, refer to <a href="https://support.mozilla.org/kb/dns-over-https">Mozilla's documentation ↗︎</a>.
Note
If you want to enforce DNS policies through the Cloudflare One Client instead of over DoH, you can disable DoH for your organization by blocking the <a href="https://support.mozilla.org/kb/canary-domain-use-application-dnsnet">Firefox DoH canary domain ↗︎</a>.</details>
<details><summary>
Google Chrome</summary>
- In Chrome, go to Settings > Privacy and security > Security.
- Scroll down and turn on Use secure DNS.
- Select With Custom.
- In the Enter custom provider field, enter <code>https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query</code>.
Read more about <a href="https://www.chromium.org/developers/dns-over-https">enabling DNS over HTTPS ↗︎</a> on Chrome.</details>
<details><summary>
Microsoft Edge</summary>
- In Microsoft Edge, go to Settings.
- Select Privacy, Search, and Services, and scroll down to Security.
- Turn on Use secure DNS.
- Select Choose a service provider.
- In the Enter custom provider field, enter <code>https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query</code>.</details>
<details><summary>
Brave</summary>
- In Brave, go to Settings > Security and Privacy > Security.
- Turn on Use secure DNS.
- Select With Custom.
- In the Enter custom provider field, enter <code>https://<YOUR_DOH_SUBDOMAIN>.cloudflare-gateway.com/dns-query</code>.</details>
<details><summary>
Safari</summary>
Currently, Safari does not support DNS over HTTPS.</details>
- 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.
DNS filtering is now turned on for this browser.
To configure your router or OS, or to add additional DNS endpoints, refer to DNS locations.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/learning-paths/secure-internet-traffic/build-dns-policies/onboard-dns/#page","headline":"Onboard DNS for a network","description":"Configure DNS filtering for a network.","url":"https://developers.cloudflare.com/learning-paths/secure-internet-traffic/build-dns-policies/onboard-dns/","inLanguage":"en","image":"https://developers.cloudflare.com/learning-paths/secure-internet-traffic/build-dns-policies/onboard-dns/og.png?v=3c2d4fafeb27f25e","dateModified":"2026-10-12","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Deploy recommended DNS filtering policies. title: Recommended DNS policies image: https://developers.cloudflare.com/learning-paths/secure-internet-traffic/build-dns-policies/recommended-dns-policies/og.png?v=355ab4658a9edec4
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/learning-paths/llms.txt
Use this file to discover all available pages before exploring further.
Docs