Online Dev Tools

Developer & Security Tools for IT Professionals

Fuel The Infrastructure
Blog

DNS Records Explained: A, AAAA, CNAME, MX, TXT and How to Read Them


DNS is the phone book of the internet, and like a phone book it has different kinds of entries for different purposes. When a site does not load, email bounces, or a domain-verification step fails, the answer is almost always in the DNS records — if you know which record type to look at. Here is the short list you actually encounter, and how to check them.

The records you meet most

To see what a hostname resolves to right now, the Hostname to IP tool performs a live lookup through a public resolver, which reflects what most of the internet currently sees — useful for confirming a change has taken effect.

The CNAME-at-the-apex trap

The most common DNS mistake: trying to put a CNAME on the apex (the bare example.com, sometimes written @). The DNS spec does not allow a CNAME to coexist with the other records an apex must have (like SOA and NS), so it either fails or behaves unpredictably. Subdomains like www can be CNAMEs freely; the apex generally needs an A/AAAA record — or a provider-specific feature (ALIAS, ANAME, or CNAME flattening) that resolves the target to an IP behind the scenes.

Propagation is really caching

When you change a record and it "hasn't propagated yet," what is actually happening is caching. Every record has a TTL (time to live); resolvers cache the old value until the TTL expires. If you plan a change, lower the TTL a day ahead so the switchover is fast. To check whether a change has landed on a widely-used resolver, look it up with Hostname to IP; if it still returns the old address, a resolver is likely still holding the cached value until its TTL runs out.

From a record to an investigation

DNS records are also the starting point for triaging something suspicious. If a hostname resolves to an IP you do not recognize, follow the trail:

A domain that suddenly resolves to a hosting provider you do not use can signal a misconfiguration or a hijacked zone; the DNS & IP Troubleshooting guide walks through that workflow.

The takeaway

Most DNS problems are one of a few things: the wrong record type (A vs CNAME), a CNAME where the apex needs an A, or a TTL-cached old value that just needs time. Know what each record does, check the live answer with Hostname to IP, and DNS stops being a black box.

Sources

  1. This article is original editorial content published by Online Dev Tools.

Related tools