Skip to content

Domain Name System (DNS)

Topical Authority Guide & Developer Workspace

Runs entirely in your browser

This tool executes locally using standard browser APIs (for example window.crypto.getRandomValues or crypto.subtle where applicable). Your input is not transmitted to or stored on a ScriptPulse server. See How Calculations Work.

No data uploaded

The Domain Name System (DNS) translates human-readable hostnames into IP addresses. Understanding DNS record types, caching mechanics, propagation delays, and secure DoH query protocols is essential for managing web hosting, mail servers, and CDN configurations.

Topic Overview

DNS acts as the lookup directory of the internet. When a domain is requested, a recursive DNS resolver queries root, TLD, and authoritative name servers to retrieve the appropriate resource records.

Traditional DNS requests are unencrypted, exposing users to eavesdropping and DNS spoofing. Modern security standards utilize DNS-over-HTTPS (DoH) to encrypt queries inside HTTPS sessions, ensuring privacy.

Two closely related lookups round out a full domain investigation: reverse DNS (resolving an IP address back to a hostname via PTR records) is essential for diagnosing mail deliverability, and WHOIS (a separate, older protocol for registration metadata) answers who controls a domain and when it was registered. Neither is part of standard forward DNS resolution, but both are frequently needed alongside it.

Core Concepts: Records, Resolution, and Reverse Lookups

DNS configurations rely on specific record types: A records map hostnames to IPv4 addresses, AAAA records map hostnames to IPv6 addresses, CNAME records alias one domain name to another, MX records define mail servers for a domain, TXT records hold arbitrary configuration metadata (SPF, DKIM, domain verification strings), and PTR records map an IP address back to a hostname — the reverse of an A record.

A standard forward lookup (name to address) is what most people mean by "DNS lookup," but reverse DNS (address to name, via PTR records under the special in-addr.arpa or ip6.arpa zones) matters specifically for mail server reputation: most receiving mail servers check that a sending IP's PTR record resolves to a hostname, and that hostname's own A record resolves back to the same IP, before accepting mail. A mismatch is a strong spam signal.

WHOIS is a separate, older protocol from DNS resolution itself: it looks up registration metadata for a domain (registrar, registration and expiration dates, sometimes registrant contact details subject to privacy redaction) rather than resolving the domain to an address. It is queried independently of the DNS resolution path but is frequently used alongside it when investigating a domain.

Recursive resolvers query root, TLD, and authoritative name servers in sequence to retrieve the appropriate resource records for a forward lookup, caching results according to each record's TTL to reduce repeated lookups.

Practical Application: Investigating a Domain's DNS Configuration

A common real-world task is confirming why mail from a domain is being marked as spam, or why a service isn't resolving as expected. Start with the DNS Lookup tool to pull the domain's current A, AAAA, MX, and TXT records directly, confirming the records that should exist actually do, and point where expected.

If the issue is mail-related, use Reverse DNS Lookup on the sending mail server's IP address to confirm it resolves to a hostname, and check that hostname's forward A record points back to the same IP. A broken or missing PTR record is one of the most common reasons legitimate mail gets rejected or flagged.

If the domain itself is unfamiliar or you need to confirm who controls it — before trusting a redirect, checking a potential typosquat, or verifying an infrastructure handoff during a migration — use the WHOIS Lookup Parser to pull registrar and registration-date information into structured fields rather than parsing raw WHOIS text output by hand.

For domains behind a CDN or load balancer, cross-reference the resolved A/AAAA records against the provider's documented IP ranges, and use the IPv4 Subnet Calculator to confirm whether a resolved address actually falls within the expected published range.

Common Mistakes and Troubleshooting

Mistake: pointing an MX record at a CNAME instead of directly at a hostname with its own A/AAAA record. RFC 1035 and RFC 2181 both prohibit this — mail servers that strictly enforce the RFC will silently fail to deliver, producing confusing intermittent delivery problems rather than a clear error.

Mistake: not lowering a record's TTL before a planned migration. If a record's TTL is 86400 seconds (24 hours) and you cut over to a new IP without lowering it in advance, resolvers that cached the old value keep using it for up to 24 hours after the change, causing a mixed-traffic period that's hard to diagnose. Fix: lower the TTL to a short value (for example 300 seconds) at least one full TTL cycle before the planned change, then restore it afterward.

Troubleshooting: if a service works from some networks but not others shortly after a DNS change, this is almost always propagation lag from resolver caching, not a configuration error — different resolvers cache independently and converge on the new value once each one's cached TTL expires, not simultaneously.

Troubleshooting: if outbound mail is being rejected specifically (not just marked as spam), check the PTR record for the sending IP first — many receiving servers reject mail outright, before content filtering even runs, if the reverse lookup doesn't resolve or doesn't match the claimed sending hostname.

Standards and Specifications

The core DNS specification is split across RFC 1034 (concepts and facilities) and RFC 1035 (implementation and specification), both from 1987 and still the foundation of how DNS resolution works today.

DNS-over-HTTPS (DoH) is defined by RFC 8484, encrypting DNS queries inside standard HTTPS traffic to prevent on-path observation or tampering by network intermediaries.

AAAA records for IPv6 are defined by RFC 3596. Common DNS configuration mistakes, including the MX-to-CNAME error described above, are catalogued directly in RFC 2181 and the older but still-referenced RFC 1912.

WHOIS itself is defined by RFC 3912, though in practice registrar and registry WHOIS output varies significantly in format since the RFC specifies the protocol, not a strict response schema — this is why a dedicated parser is more reliable than manually reading raw output.

Decision Guidance: Choosing the Right Record Type

Use an A record when you need to point a hostname directly at a specific IPv4 address you control and expect to manage yourself. Use a CNAME when you need to alias a hostname to another hostname whose IP may change without your involvement (common for CDN and SaaS endpoints) — but never at your domain's root/apex, since most authoritative servers don't permit a CNAME to coexist with other records at that level. See the A vs CNAME comparison for the full tradeoff.

Use an AAAA record whenever you also maintain an A record for the same host and have IPv6 connectivity available — modern dual-stack practice is to publish both rather than choosing one, so resolvers and clients can use whichever protocol they support. See the A vs AAAA comparison for when IPv6-only or dual-stack publishing makes sense for your setup.

If you're deciding whether a networking problem is a DNS issue or an IP-routing issue, resolve the hostname first — if it resolves to the correct, expected address but connectivity still fails, the problem is routing, not DNS. See the DNS vs IP Routing comparison for how to separate these two failure domains during troubleshooting. Once you've confirmed DNS itself is resolving correctly, the Networking & Infrastructure hub covers the subnet, routing, and addressing fundamentals needed to diagnose what happens next.

Related Developer Hubs

Explore neighboring topics that connect to this one.

Frequently Asked Questions

What does a CNAME record do?
A CNAME (Canonical Name) record aliases one domain name to another, redirecting routing queries to the target domain without changing paths.
How does DNS-over-HTTPS (DoH) protect privacy?
DoH encrypts DNS lookups inside standard HTTPS traffic on port 443, preventing network routers and ISPs from tracking the domains you visit.
Why does mail get rejected even though my A and MX records are correct?
Most likely a missing or mismatched PTR (reverse DNS) record for the sending mail server's IP. Many receiving servers require the IP to resolve to a hostname, and that hostname to resolve back to the same IP, before accepting mail — check this with the Reverse DNS Lookup tool.
What is the difference between DNS and WHOIS?
DNS resolves a domain name to the addresses and records it publishes (A, MX, TXT, and so on); WHOIS looks up registration metadata about who owns the domain and when it was registered. They are separate protocols queried independently, though often used together when investigating a domain.
Can I point my domain's root (apex) at a CNAME?
No — most authoritative DNS providers don't allow a CNAME to coexist with other required records (like NS or SOA) at the zone apex. Use an A/AAAA record at the root, or a provider-specific ALIAS/ANAME record if you need CNAME-like behavior there.
Why do different locations see different DNS results right after a change?
This is resolver caching (TTL), not a configuration error — resolvers that queried before your change keep serving the old cached value until that record's TTL expires, so different networks converge on the new value at different times rather than all at once.
Is reverse DNS the same as a PTR lookup?
Yes — "reverse DNS lookup" and "PTR lookup" refer to the same operation: resolving an IP address back to a hostname using a PTR record under the in-addr.arpa (IPv4) or ip6.arpa (IPv6) zone.