Senior
Which protocol is used for DNS queries? Is it the only possible protocol?
sobes.tech AI
Answer from AI
DNS queries are usually performed over UDP on port 53, as UDP provides fast exchange without establishing a connection. However, if the response is too large for UDP (for example, when using DNSSEC or large records), queries may be performed over TCP.
Thus, DNS uses both protocols — UDP for most queries and TCP for cases where reliable transmission or large data transfer is necessary. Additionally, there are extensions and alternatives, such as DNS over HTTPS (DoH) and DNS over TLS (DoT), which use HTTP/2 or TLS to enhance security and privacy.