DNS (Domain Name System) translates human-readable domain names into IP addresses that computers use to establish connections. A DNS lookup queries the DNS system for records associated with a domain and returns information like IP addresses, mail servers, and domain verification tokens.
Common DNS record types include: A (IPv4 address), AAAA (IPv6 address), CNAME (canonical name alias), MX (mail exchange server), TXT (text records for verification and SPF/DKIM), NS (authoritative name servers), and SOA (start of authority).
For web scraping, DNS resolution is the first step in connecting to a target URL. DNS failures, misconfigured records, or slow TTL propagation can cause connectivity errors. Understanding DNS helps debug why requests to a URL fail or resolve to unexpected IP addresses.