DNS (Domain Name System)

Definition

DNS is the hierarchical, distributed naming system that translates human-readable domain names (e.g., example.com) into IP addresses (e.g., 93.184.216.34). It is one of the foundational protocols of the Internet, operating on port 53 (UDP/TCP).

DNS is a tree structure with root servers at the top, followed by TLD (Top-Level Domain) servers (.com, .org), authoritative name servers for specific domains, and recursive resolvers that cache results.

Key Concepts

  • A Record: Maps domain to IPv4 address
  • AAAA Record: Maps domain to IPv6 address
  • CNAME: Alias record pointing to another domain name
  • MX Record: Mail exchange server for email routing
  • NS Record: Nameserver delegation for a domain
  • TXT Record: Text data, commonly used for SPF, DKIM, DMARC
  • SOA Record: Start of Authority — zone metadata (serial, refresh, expire)
  • TTL (Time To Live): How long resolvers cache the record
  • Recursive Resolver: Queries DNS on behalf of the client (e.g., 8.8.8.8, 1.1.1.1)
  • Authoritative Server: Holds the definitive records for a domain

DNS Security

  • DNSSEC: Adds cryptographic signatures to DNS records to prevent spoofing
  • DoH (DNS over HTTPS): Encrypts DNS queries via HTTPS
  • DoT (DNS over TLS): Encrypted DNS on port 853
  • DNSSEC: Signs DNS records to prevent tampering
  • Tls
  • Cdn — PTR records mapping IP to domain

References