DNS Firewall

Last updated May 5, 2026 Speed up and protect entire authoritative nameservers

Enterprise-only paid add-on

Cloudflare DNS Firewall proxies all DNS queries to your nameservers through Cloudflare’s global network. This action protects upstream nameservers from DDoS attacks and reduces load by caching DNS responses.

Diagram showing protection provided by DNS Firewall. For more details, read further.

DNS Firewall is for customers who need to speed up and protect entire authoritative nameservers. If you need to speed up and protect individual zones, refer to Cloudflare DNS Setups.


How DNS Firewall works

When a DNS query for your domain takes place:

  1. Queries go to the Cloudflare data center that is closest to the website visitor. This is determined by the location of the DNS resolver.
  2. Cloudflare tries to return a DNS response from cache.
  3. If the response is not available in cache, Cloudflare queries the upstream authoritative nameservers.
  4. After returning the response from the nameservers, Cloudflare temporarily caches it for subsequent DNS queries.

Benefits

DNS Firewall provides the following benefits while allowing your organization total control over your authoritative nameservers:

  • DDoS mitigation
  • High availability
  • Global distribution
  • Enhanced performance
  • Bandwidth savings
  • Rate limiting per data center
  • Minimum and maximum cache TTL specification
  • DNS ANY ↗︎ query type block

Was this helpful?

YesNo

On this page

DNS Firewall - 图2Docs

{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/dns/dns-firewall/#page","headline":"DNS Firewall","description":"Protect and accelerate authoritative nameservers with DNS-level caching and DDoS mitigation.","url":"https://developers.cloudflare.com/dns/dns-firewall/","inLanguage":"en","image":"https://developers.cloudflare.com/dns/dns-firewall/og.png?v=f61e864d24bebffe","dateModified":"2026-05-05","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/"},"keywords":["Caching"]}


description: Access DNS Firewall query analytics and configure Logpush for DNS logs. title: Analytics and logs image: https://developers.cloudflare.com/dns/dns-firewall/analytics/og.png?v=73658343ce8a5636


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/dns/llms.txt
Use this file to discover all available pages before exploring further.