Table of Contents

Open your domain’s DNS settings and you are greeted by a list of records with cryptic names — A, CNAME, MX, TXT — each with its own fields and rules. It looks intimidating, but every one of these records is just a simple instruction telling the internet where a particular kind of traffic for your domain should go. Once you know what each does, the DNS panel becomes easy to read and manage.

This guide explains the main DNS record types in plain language: what an A record, CNAME, MX record, and TXT record each do, plus the other types you will occasionally meet. You will see clear examples, learn which records you will actually touch and when, and understand how they work together to point your domain at your website, your email, and the services you connect.

Animated illustration of website files on a server going live to a website in the cloud

Did you know?

Every DNS record is essentially a small instruction stored on your domain’s nameserver — one line that says “traffic of this type should go here.” Learn what the handful of common types do, and you can manage almost any domain with confidence.

What DNS records are

DNS records are the individual instructions stored on your domain’s authoritative nameserver that tell the internet how to handle your domain. Each record routes a specific kind of traffic — web visitors to your site, email to your inbox, verification checks to the right place — by mapping a name to a destination.

You manage these records through a DNS editor (sometimes called a zone editor) provided by your registrar or hosting company. Adding, editing, or removing a record changes how your domain behaves: point it at a new server, connect a new email provider, or prove ownership to a third-party service.

Every record has a type (A, CNAME, MX, and so on), a name or host (which part of your domain it applies to), a value (where it points), and a TTL (how long it can be cached). Once you recognise these common fields, editing records becomes routine rather than daunting.

The A record: your website’s address

The A record is the most fundamental record. It connects your domain to an IPv4 address — the numeric address of the server hosting your website — so that when someone types your domain, their browser is sent to the right server. For example, it maps example.com to something like 192.0.2.1.

This is the record you set to point your domain at your hosting. If you move to a new host, updating the A record to the new server’s IP address is what redirects visitors to the new location. It is the workhorse that turns your name into a live website.

You will typically have an A record for your root domain (often shown as @) and may have others for subdomains. When people talk about “pointing a domain” to a server, the A record is usually what they mean.

The CNAME record: aliases and nicknames

A CNAME (Canonical Name) record points one domain name to another domain name, rather than to an IP address. It creates an alias — a nickname that says “treat this name the same as that name.” A classic use is pointing www.example.com to example.com, so both lead to the same place.

CNAMEs are also how you connect subdomains to external services. If a third-party platform tells you to point shop.yourdomain.com at their servers, you usually do it with a CNAME aimed at a hostname they provide. Because it references a name rather than a fixed IP, it keeps working even if the target’s underlying address changes.

One important rule: a CNAME cannot be used on your root (apex) domain, and its value must always be a domain name, never an IP address. So CNAMEs are for subdomains and aliases, while A records handle the root domain and direct IP pointing.

The MX record: routing your email

An MX (Mail Exchange) record tells the internet where to deliver email sent to your domain. When someone emails you@yourdomain.com, the sending server looks up your MX records to find the mail server responsible for your domain, then delivers the message there.

MX records use priority numbers to set the order in which mail servers are tried — a lower number means higher priority, so a server at priority 10 is tried before one at priority 20. This lets you configure backup mail servers for redundancy: if the primary is unavailable, mail flows to the next in line.

When you set up email — whether with a dedicated email provider or your host’s mail service — you add the MX records they specify. Getting these right is what makes email to your domain actually arrive; a missing or wrong MX record is a common reason email silently fails.

The TXT record: verification and email security

A TXT record holds plain text data in your DNS, readable by outside services. It has two big jobs. The first is verification: services like Google or various platforms ask you to add a specific TXT record to prove you control the domain before they enable a feature.

The second, increasingly important job is email security. TXT records hold SPF, DKIM, and DMARC settings — the three standards that together prove your email is genuine and stop scammers from forging your domain. SPF lists which servers may send mail for you, DKIM adds a cryptographic signature, and DMARC sets the policy for handling messages that fail those checks.

Because TXT records are free-form text, they are flexible, but the exact value matters — a stray character can break verification or email authentication. When adding one, copy the value exactly as the service provides it.

The common record types at a glance

Here is a quick reference to the records you are most likely to encounter, what each does, and a plain example of its job.

Common DNS records

Record What it does Example use
A Points a domain to an IPv4 address example.com to 192.0.2.1 (your site)
AAAA Points a domain to an IPv6 address Same as A, but for IPv6
CNAME Aliases one name to another name www to the root domain
MX Routes email to a mail server Deliver mail to your email provider
TXT Holds text for verification and security SPF, DKIM, DMARC, domain verification
NS Specifies the domain’s nameservers Delegates DNS control

There are more record types — SRV for specific services, CAA for controlling certificate authorities, and others — but the ones above cover the vast majority of what a typical domain owner needs. Recognise these, and most DNS panels become straightforward.

Which records you will actually touch

In everyday practice, you will mostly work with a small subset. To point your domain at a website, you edit the A record (and sometimes a CNAME for www). To set up email, you add the MX records your provider specifies, often alongside TXT records for SPF, DKIM, and DMARC.

TXT records also come up whenever you verify ownership with a service — a one-time addition to prove the domain is yours. AAAA records exist for IPv6 but are usually configured by your host automatically, so you rarely need to touch them directly.

The rest — NS, SRV, CAA — are either set up for you or needed only in specific situations. So while the full list looks long, the day-to-day reality is a handful of records: A and CNAME for pointing, MX and TXT for email and verification. Master those and you can manage almost any domain.

Want a DNS panel that makes records simple?

Hostinger’s DNS zone editor lays out A, CNAME, MX, and TXT records clearly, so you can point your domain, connect email, and verify services from one dashboard — with a free domain included on its hosting plans.

See Hostinger plans

FAQs

What are the main types of DNS records?

The four you will use most are the A record (points a domain to an IPv4 address for your website), CNAME (aliases one name to another), MX (routes email to your mail server), and TXT (holds text for verification and email security like SPF, DKIM, and DMARC). Others include AAAA (IPv6), NS (nameservers), and SRV (specific services).

What is the difference between an A record and a CNAME?

An A record points a domain directly to an IPv4 address (a number, like 192.0.2.1), while a CNAME points a name to another domain name (an alias), never to an IP. Use an A record for your root domain and direct server pointing; use a CNAME for subdomains and aliases, such as pointing www to your root domain.

What does an MX record do?

An MX (Mail Exchange) record tells sending servers where to deliver email for your domain. It points to your mail server and uses priority numbers — lower is tried first — so you can set backups for redundancy. When you configure email with a provider, you add their MX records; without correct MX records, email to your domain will not arrive.

What is a TXT record used for?

A TXT record stores plain text in your DNS for outside services to read. Its two main uses are verifying domain ownership (a service asks you to add a specific value) and email security — holding SPF, DKIM, and DMARC settings that prove your email is genuine and prevent spoofing. Copy the value exactly, as small errors can break it.

Do I need to edit DNS records myself?

Often, yes — but only a few. To point your domain at hosting you set the A record; to add email you enter your provider’s MX and TXT records; to verify a service you add a TXT record. Records like AAAA, NS, and SRV are usually configured automatically or only in special cases, so day-to-day you touch just a handful.

Where do I manage my DNS records?

In the DNS editor (or zone editor) provided by whoever holds your domain’s nameservers — usually your registrar or hosting company. There you can add, edit, and remove records, each with a type, a name/host, a value, and a TTL. A clear DNS panel makes pointing your domain, setting up email, and verifying services straightforward.

The bottom line

DNS records are the individual instructions stored on your domain’s nameserver that tell the internet where each kind of traffic should go, and managing them is simply a matter of knowing what the common types do. The A record points your domain to your website’s IP address; the CNAME aliases one name to another (great for subdomains and www); the MX record routes your email to the right mail server using priorities for redundancy; and the TXT record holds text for verifying ownership and securing email with SPF, DKIM, and DMARC.

Beyond those, records like AAAA, NS, and SRV exist for IPv6, nameserver delegation, and specific services, but they are usually configured for you or needed only occasionally. In daily practice you work with a small set — A and CNAME for pointing your domain, MX and TXT for email and verification — through a DNS editor at your registrar or host. Learn that handful, and the once-intimidating DNS panel becomes an easy, powerful tool for controlling exactly how your domain behaves.

When you are ready, you can start with Hostinger and use code PROTIPS for the reader discount. DNS records route your domain’s traffic: A points to your site’s IP, CNAME aliases names, MX routes email, TXT handles verification and email security. Master those four and you can manage any domain.

Scroll to Top