DNS is one of the parts of the internet that most website owners never have to think about until something breaks. A website suddenly stops loading, email stops arriving, or a new subdomain refuses to work, and the problem often turns out to be a DNS record.
DNS, or the Domain Name System, translates names such as example.com into information that computers can use. DNS does much more than point a domain at a web server. Different record types tell DNS resolvers where websites live, where email should be delivered, which hostnames are aliases, and how other systems should treat a domain.
A DNS record is an entry in a DNS zone. Each record has a name, a type, a value, and usually a TTL, or time to live. The exact interface varies between registrars and hosting providers, but the underlying concepts are the same.
| Record | Purpose | Typical value |
|---|---|---|
| A | Maps a hostname to an IPv4 address | 203.0.113.10 |
| AAAA | Maps a hostname to an IPv6 address | 2001:db8::10 |
| CNAME | Makes one hostname an alias of another | www.example.com |
| MX | Specifies mail delivery servers | mail.example.com |
| TXT | Stores text used by many services | SPF, verification, policy data |
| NS | Identifies authoritative nameservers | ns1.example.com |
An A record maps a hostname to an IPv4 address. For example, an A record for example.com might point to 203.0.113.10. When a browser needs the IPv4 address for that hostname, a recursive resolver can obtain the answer from the authoritative DNS servers.
A records are commonly used for the root domain and for hostnames such as www, shop, or app. If you move a website to another server and DNS is managed separately from your hosting account, changing its A record is one way to direct traffic to the new server.
An AAAA record performs the equivalent job for IPv6. If your server has both IPv4 and IPv6 connectivity, you may have both A and AAAA records for the same hostname.
Do not add an AAAA record simply because IPv6 exists. The IPv6 address needs to be correctly configured and reachable. A broken AAAA record can cause some visitors to experience failures even though the IPv4 configuration works.
A CNAME record makes one hostname an alias of another hostname. For example, www.example.com can point to example.com. The important distinction is that a CNAME points to a name, not directly to an IP address.
CNAME records are also common when using third-party services. A provider may tell you to create something such as verify.example.com CNAME token.provider.example. The exact value must be copied from the provider because the target is usually service-specific.
MX records tell sending mail servers where email for a domain should be delivered. An MX record contains a hostname and a priority value. Lower numerical preference values are normally attempted first.
For example, a domain might have:
example.com. MX 10 mail.example.com.
The MX record does not contain the mail server’s IP address. The mail server hostname must itself resolve through A or AAAA records. That is why a mistake in either the MX record or the address record can break mail delivery.
TXT records are flexible text records used by many systems. They are commonly associated with domain verification and email authentication.
TXT records can look complicated because different services use different formats. Do not edit a verification value unless you know which service depends on it.
NS records identify the authoritative nameservers for a DNS zone. Your registrar’s nameserver settings determine which DNS servers are authoritative for the domain. Those servers then publish the zone’s A, AAAA, MX, TXT, and other records.
This distinction is important. Changing a record inside a DNS zone is not the same thing as changing the domain’s authoritative nameservers. If you change nameservers, you can effectively move the entire DNS zone to another provider.
TTL controls how long a resolver may cache a DNS answer. A lower TTL can make planned changes easier to roll out, while a higher TTL can reduce repeated DNS queries. TTL does not mean every device on the internet will refresh at exactly the same time.
Before a planned migration, administrators often lower relevant TTL values ahead of the change. After the new configuration is stable, TTL can be increased again if appropriate.
example.com and www.example.com are different hostnames.Start by deciding exactly what is failing. Website resolution, email delivery, and a third-party verification problem can involve completely different records.
On a Linux or macOS system, commands such as these can help:
dig example.com A
dig example.com AAAA
dig example.com MX
dig example.com TXT
dig www.example.com CNAME
Compare the answers against the authoritative configuration. If a recursive resolver still has an older answer cached, the result may differ temporarily from the authoritative server.
dig or another DNS lookup tool to verify the result.DNS becomes much less intimidating once each record type has a specific job. A records handle IPv4 addresses, AAAA handles IPv6, CNAME creates aliases, MX directs email, TXT carries service and policy information, and NS identifies authoritative DNS servers.
If you are moving a site or setting up a new domain, understanding these records can prevent a surprisingly large number of avoidable outages. For hosting, domains, DNS management, and the infrastructure behind your website, visit GaugeHosting.
It helps to distinguish between a recursive resolver and an authoritative DNS server. Your laptop or phone usually asks a recursive resolver for an answer. That resolver may already have the answer cached, or it may query the authoritative servers responsible for the domain. The authoritative server is the source of truth for the zone.
This distinction explains why two networks can temporarily return different DNS answers after a change. One resolver may have refreshed while another still has a cached response within its TTL.
DNS interfaces often represent the root of a zone with an @ symbol. That means a record such as @ A 203.0.113.10 applies to the bare domain. A record for www applies to www.example.com.
This is a common source of confusion when following instructions from a hosting provider. If the interface already knows which domain you are editing, entering the full domain name where it expects only a hostname can create an unintended record.
DNS only tells clients where a service can be found. It does not install a website, configure Apache or Nginx, create a database, or make an application respond correctly. A correct A record can point traffic to a server that has no website configured for that hostname.
For web hosting, domains, DNS, and website infrastructure, visit GaugeHosting.