Port 53 (DNS)

What port 53 is used for, when DNS uses UDP and when it uses TCP, and how to test whether DNS is working.

Updated

Port 53 is the port for DNS, the Domain Name System, which translates names such as example.com into IP addresses. DNS uses port 53 over both UDP and TCP. Nearly everything else on a network depends on it, so a DNS failure often looks like "the internet is down" even when connectivity is fine.

At a glance

Port 53
Service DNS
Transport UDP and TCP
Encrypted alternatives DNS over TLS (port 853), DNS over HTTPS (port 443)

UDP and TCP

Most queries go over UDP, because a lookup is typically one small packet out and one back.

TCP is used when:

  • A response is too large for UDP. The server sets the truncated (TC) flag, and the client retries over TCP.
  • Zone transfers copy a whole zone between authoritative servers.
  • The client or server chooses it. Any query may be sent over TCP.

A common mistake is to allow only UDP 53 through a firewall. That works most of the time and then fails for large responses, which are more frequent with DNSSEC and with records that hold a lot of data. Allow both.

Who talks to whom

  • Your device sends queries to a recursive resolver, usually one supplied by your network or one you configured.
  • The resolver queries authoritative name servers on your behalf, also on port 53, and caches the answers.
  • Authoritative servers hold the actual records for a domain.

Troubleshooting

Start by separating DNS problems from connectivity problems. If you can reach a known IP address but not a hostname, DNS is the likely cause.

dig example.com
dig @1.1.1.1 example.com
dig +tcp example.com
nslookup example.com
  • dig example.com uses your configured resolver.
  • dig @1.1.1.1 example.com asks a specific public resolver. If this works and the first command does not, your configured resolver is the problem.
  • dig +tcp forces TCP, which tests whether TCP 53 is allowed.

Reading the result

Status Meaning
NOERROR The query succeeded. An empty answer means the name exists but has no record of that type.
NXDOMAIN The name does not exist.
SERVFAIL The resolver could not get a valid answer, often because of an authoritative server or DNSSEC problem.
REFUSED The server will not answer this query for you.
Timeout No reply at all. Suspect a firewall or an unreachable server.

Caching

Each record has a time to live (TTL) that tells resolvers how long they may cache it. After you change a record, some users will keep receiving the old answer until the cached copy expires. This is usually what people mean by "DNS propagation."

Security notes

Traditional DNS on port 53 is unencrypted, so queries are visible to the networks they cross. DNS over TLS and DNS over HTTPS encrypt the link between a client and its resolver. A DNS resolver should not answer recursive queries from the whole internet, because open resolvers are abused in amplification attacks.

Related

After a name resolves, web connections usually go to port 443.

IANA registration

This is the assignment for port 53 exactly as the registry lists it, one row per service name and transport.

Service name Transport Description Reference
domain TCP Domain Name Server None listed
domain UDP Domain Name Server None listed

Source: IANA Service Name and Transport Protocol Port Number Registry, as downloaded on December 5, 2026. The registry changes over time; the linked page is the authority.

A registration records who a port number is assigned to. It does not prove that whatever is listening on the port is that service, and it does not mean the service uses every transport listed: older entries were routinely registered for both TCP and UDP.

Port range

Port 53 falls in the well-known (system) port range, 0 to 1023. RFC 6335 calls these System Ports. IANA assigns them only through the IETF Review or IESG Approval procedures, the strictest rules of the three ranges. On Unix-like systems a program has traditionally needed root privileges to listen on a port below 1024.

The other ranges are registered (user) ports (1024 to 49151) and dynamic (private) ports (49152 to 65535). The ranges and the assignment rules are defined in RFC 6335.

Look up another port in the port table.