Network Engineering: A Practical Guide to DNS Lookup
August 18, 2026 · The Devs Tools Team
The Domain Name System is the distributed lookup layer that maps human-readable hostnames to the numeric addresses and routing information machines actually need to communicate. When a client asks "what is example.com," the answer isn't a single value — it depends entirely on which record type is queried, since a domain can simultaneously hold an IPv4 address, an IPv6 address, a mail routing rule, and arbitrary text metadata, all resolved independently. A traditional DNS resolution happens over UDP port 53 to a resolver configured at the OS or router level, which is fine for a desktop application but unusable for a static, client-side web page with no backend server to make that query on the user's behalf — browsers have no built-in JavaScript API for raw DNS queries. DNS-over-HTTPS (DoH), standardized in RFC 8484, solves this by wrapping a DNS query inside a normal HTTPS request to a resolver that exposes a JSON or wire-format API endpoint. A browser-based tool can fetch() a DoH endpoint like Cloudflare's cloudflare-dns.com/dns-query, pass the hostname and record type as query parameters, and receive the resolved records back as JSON — all using standard web APIs, with the added benefit that the query itself travels encrypted over TLS rather than plaintext UDP, which also protects against on-path DNS spoofing or eavesdropping visible to a network operator.
[!TIP] Need to query DNS records right now? Try our free, local DNS Lookup to resolve A, AAAA, CNAME, MX, TXT, and NS records for any domain completely offline in your browser.
The Core Record Types and What They Mean
- A — Maps a hostname to an IPv4 address (e.g.,
93.184.216.34). This is the most fundamental record type; without it (or AAAA), a hostname has nothing to route traffic to over IPv4. - AAAA — The IPv6 equivalent of an A record, mapping a hostname to a 128-bit IPv6 address. Modern dual-stack networks query both A and AAAA and let the client choose which protocol to use.
- CNAME — An alias that points one hostname to another hostname rather than directly to an IP (e.g.,
www.example.com→example.com). A CNAME cannot coexist with other record types on the same name per the DNS spec, which trips up a lot of people configuring subdomains. - MX — Mail Exchange records specify which mail servers accept email for the domain, each with a numeric priority (lower value = higher priority) so senders know the preferred and fallback mail hosts.
- TXT — Free-form text records used for a wide range of verification and policy purposes: domain ownership verification (e.g., Google Search Console), SPF records for email sender authorization, and DKIM public keys for email signing.
- NS — Name Server records identify which authoritative servers are responsible for answering queries about the domain — these are what get delegated when you point a domain at a DNS provider.
Querying Over DNS-over-HTTPS
A DoH JSON query for the A records of a domain looks roughly like this:
GET https://cloudflare-dns.com/dns-query?name=example.com&type=A
Accept: application/dns-json
The response returns a JSON payload containing the resolved Answer array, with each entry's type, TTL (time-to-live, in seconds, indicating how long the result should be cached), and data fields — all parseable directly in the browser without any server-side proxy.
Common Pitfalls
- Confusing CNAME chains with A record resolution: A hostname pointing to a CNAME still ultimately needs the target to resolve to an A/AAAA record — a broken chain anywhere along the way causes total resolution failure, and diagnosing it requires walking the chain link by link.
- Ignoring TTL when debugging propagation: After changing a DNS record, old values can remain cached at various resolvers until the previous record's TTL expires — a lookup returning a "wrong" answer immediately after a change is often just cache, not a misconfiguration.
- Assuming every resolver sees the same answer instantly: DNS propagation isn't instantaneous or synchronized; different resolvers around the world may return the old and new values simultaneously during a transition window.
Conclusion
DNS underpins nearly every network interaction, yet its record-type model and propagation behavior remain a common source of confusion during infrastructure changes. DNS-over-HTTPS makes it possible to inspect these records directly from a browser with proper encryption in transit, giving network engineers and developers a fast, dependency-free way to verify configuration changes without reaching for a terminal.
