DNS Lookup Tool
Part of Network & Web Tools
Learn about DNS record types and how domain name resolution works in the Domain Name System.
What is DNS?
DNS (Domain Name System) is often called the "phone book of the internet." It translates human-readable domain names like www.example.com into IP addresses like 93.184.216.34 that computers use to communicate. Without DNS, you would need to memorize numerical IP addresses for every website you want to visit. DNS makes the internet accessible and user-friendly by allowing us to use memorable names instead of numbers.
When you type a domain name in your browser, your computer sends a DNS query to find the corresponding IP address. This process involves multiple DNS servers working together: your device first contacts a recursive resolver (usually provided by your ISP), which then queries root nameservers, top-level domain (TLD) nameservers, and finally the authoritative nameservers for that specific domain. The entire process typically takes milliseconds and happens transparently in the background.
Common DNS Record Types
A Record (Address): Maps a domain name to an IPv4 address. This is the most fundamental DNS record type. Example: example.com → 93.184.216.34. When you visit a website, the A record tells your browser which server to connect to. A domain can have multiple A records pointing to different IP addresses for load balancing or redundancy. Use our IP Address Lookup to find your current IP.
AAAA Record: Maps a domain name to an IPv6 address. Similar to A records but for the newer IPv6 protocol. Example: example.com → 2606:2800:220:1:248:1893:25c8:1946. As IPv6 adoption increases, AAAA records become more important. Many domains have both A and AAAA records to support both IPv4 and IPv6 clients.
CNAME Record (Canonical Name): Creates an alias that points one domain name to another. Used when you want multiple names to point to the same location. Example: www.example.com → example.com. CNAME records cannot coexist with other record types for the same name, and you cannot use a CNAME for the root domain (example.com), only for subdomains.
MX Record (Mail Exchange): Specifies mail servers responsible for accepting email for a domain. Each MX record has a priority number—lower numbers have higher priority. Example: example.com → mail.example.com (priority 10). When someone sends email to user@example.com, their mail server queries the MX records to find where to deliver the message.
TXT Record: Holds arbitrary text data, often used for domain verification and security policies. Common uses include SPF (email sender verification), DKIM (email authentication), DMARC (email policy), and domain ownership verification for services like Google Workspace. Example: "v=spf1 include:_spf.google.com ~all"
NS Record (Nameserver): Delegates a domain or subdomain to a set of nameservers. These records specify which servers are authoritative for DNS information about the domain. Example: example.com → ns1.example.com, ns2.example.com. Nameserver records are crucial for the DNS hierarchy and are set at your domain registrar. Check domain ownership with our WHOIS Lookup.
How DNS Resolution Works
DNS resolution follows a hierarchical process. When you enter a domain in your browser, your computer first checks its local DNS cache to see if it recently looked up that domain. If not cached, it contacts your configured DNS resolver (usually your ISP's or a public DNS like Google's 8.8.8.8 or Cloudflare's 1.1.1.1). The resolver also has a cache, and if the record isn't there, it begins the recursive resolution process.
The resolver first queries one of the 13 root nameserver clusters (represented by letters A through M), asking "who handles .com domains?" The root server responds with the addresses of the .com TLD nameservers. The resolver then asks a .com TLD nameserver "who handles example.com?" The TLD server responds with the authoritative nameservers for example.com. Finally, the resolver queries those authoritative nameservers for the specific record it needs, like the A record for www.example.com.
DNS Caching and TTL
Every DNS record has a TTL (Time To Live) value, measured in seconds, that tells DNS resolvers and clients how long to cache the result before querying again. A TTL of 3600 means the record will be cached for one hour. Short TTLs (300-900 seconds) allow for quick DNS changes, useful when migrating servers or making frequent updates. Long TTLs (86400+ seconds) reduce DNS query load and improve performance but mean changes propagate slowly.
DNS caching occurs at multiple levels: your operating system caches DNS responses, your router may cache them, your ISP's DNS resolver caches them, and intermediate resolvers cache them. This is why DNS changes don't take effect instantly globally—even after you update a record, it may take hours or even days for all cached copies to expire and be refreshed with the new value.
DNS Security Considerations
DNSSEC (DNS Security Extensions): Adds cryptographic signatures to DNS records, preventing attackers from tampering with DNS responses. When DNSSEC is enabled, resolvers can verify that DNS records haven't been modified in transit. This protects against cache poisoning attacks where attackers inject false DNS records to redirect users to malicious sites.
DNS over HTTPS (DoH) and DNS over TLS (DoT): Encrypt DNS queries to prevent eavesdropping and manipulation by ISPs or network attackers. Traditional DNS queries are sent in plain text, allowing anyone on the network path to see which domains you're looking up. DoH and DoT solve this privacy issue by encrypting DNS traffic.
DNS hijacking and poisoning: Attackers can compromise DNS servers or intercept DNS traffic to redirect users to fraudulent websites. Using reputable DNS providers, enabling DNSSEC, and using encrypted DNS queries helps protect against these attacks.
Public DNS Resolvers
Google Public DNS: 8.8.8.8 and 8.8.4.4 (IPv4), 2001:4860:4860::8888 and 2001:4860:4860::8844 (IPv6). Fast, reliable, and supports DNSSEC. Offers DoH and DoT.
Cloudflare DNS: 1.1.1.1 and 1.0.0.1 (IPv4), 2606:4700:4700::1111 and 2606:4700:4700::1001 (IPv6). Focuses on privacy and speed, doesn't log queries. Supports DNSSEC, DoH, and DoT.
Quad9: 9.9.9.9 (IPv4), 2620:fe::fe (IPv6). Blocks access to known malicious domains, providing additional security. Non-profit operated, privacy-focused.
Common DNS Issues and Troubleshooting
DNS propagation delays: After changing DNS records, it takes time for the changes to spread across all DNS servers worldwide. Reduce TTL values before making changes to speed up propagation.
DNS cache problems: Stale cached records can cause websites to be unreachable. Flush your local DNS cache: ipconfig /flushdns (Windows) or sudo dscacheutil -flushcache (macOS).
NXDOMAIN errors: "Non-existent domain" errors mean the DNS server couldn't find any records for the requested domain. Check for typos or verify the domain exists.
Timeout errors: DNS queries failing to complete suggest network connectivity issues, firewall blocking DNS traffic (port 53), or DNS server problems. Try alternative DNS servers.
DNS Tools and Commands
nslookup: Available on Windows, macOS, and Linux. Basic DNS query tool. Usage: nslookup example.com
dig: More powerful DNS query tool available on macOS and Linux. Provides detailed information. Usage: dig example.com
host: Simple DNS lookup utility. Usage: host example.com
Online DNS checkers: Websites like whatsmydns.net and dnschecker.org let you check DNS propagation from multiple locations worldwide.
Browser Limitations
Note: Web browsers cannot directly perform DNS lookups due to security restrictions. JavaScript running in a browser doesn't have access to low-level networking functions required for DNS queries. To actually query DNS records, you would need to use command-line tools (dig, nslookup), online DNS checking services, or server-side applications. This tool provides educational information about how DNS works and what different record types mean.