DNS Ports Explained
DNS traffic uses specific network ports depending on the protocol and transport method. Understanding these ports is essential for firewall configuration, network troubleshooting, and implementing encrypted DNS.
Port 53: Standard DNS
Port 53 is the default port for DNS queries and responses, used for both UDP and TCP transport.
- UDP/53 handles the vast majority of DNS queries. Standard DNS queries and responses fit within a single UDP datagram (originally limited to 512 bytes, extended to 4096 bytes with EDNS0 per RFC 6891).
- TCP/53 is used when responses exceed the UDP payload limit, when the resolver retries after a truncated UDP response (the TC flag), and for zone transfers (AXFR and IXFR) between authoritative servers.
If your firewall blocks port 53, DNS resolution fails entirely. This is the first port to check when troubleshooting DNS connectivity. Use our DNS lookup tool to verify that your domain's records resolve correctly from external resolvers.
Port 443: DNS over HTTPS (DoH)
DNS over HTTPS (DoH), defined in RFC 8484, encapsulates DNS queries inside standard HTTPS traffic on port 443.
- Queries are sent as HTTP POST or GET requests to a resolver's DoH endpoint (e.g.,
https://1.1.1.1/dns-query). - Because it uses the same port as regular HTTPS, DoH traffic is indistinguishable from normal web browsing to network observers.
- Browser support: Firefox, Chrome, Edge, and Safari all support DoH. Firefox uses Cloudflare's resolver by default in the U.S.
- Trade-off: DoH provides privacy from on-path observers but makes network-level DNS filtering (used by corporate firewalls and parental controls) difficult to enforce.
Port 853: DNS over TLS (DoT)
DNS over TLS (DoT), defined in RFC 7858, wraps DNS queries in a TLS connection on a dedicated port.
- Unlike DoH, DoT uses its own port (853), making it identifiable and filterable by network administrators.
- DoT provides the same encryption and privacy benefits as DoH but is easier to manage in enterprise environments because firewalls can specifically allow or block port 853.
- OS support: Android 9+ supports DoT natively ("Private DNS" setting). Linux resolvers like systemd-resolved also support it.
Zone Transfers: TCP/53
DNS zone transfers (AXFR for full transfers, IXFR for incremental) use TCP on port 53. Zone transfers replicate the entire contents of a DNS zone from a primary server to secondary servers.
Because zone transfers expose all records in a zone, they should be restricted by IP address using access control lists (ACLs) on the authoritative server. Unrestricted zone transfers are a well-known security misconfiguration.
Port Summary
| Port | Protocol | Purpose |
|---|---|---|
| 53 | UDP | Standard DNS queries |
| 53 | TCP | Large responses, zone transfers |
| 443 | TCP (HTTPS) | DNS over HTTPS (DoH) |
| 853 | TCP (TLS) | DNS over TLS (DoT) |
Firewall Recommendations
For a standard DNS server, allow inbound and outbound UDP/53 and TCP/53. If you run a recursive resolver that supports encrypted DNS, also open 443 (DoH) or 853 (DoT) as appropriate. Always restrict zone transfer access on TCP/53 to known secondary server IPs.
Verify that your domain's DNS is reachable and returning correct records using our DNS lookup tool.
Stay on top of your email infrastructure. Sign up for the InboxTooling newsletter for deliverability tips, tool updates, and best practices.