Skip to content

DNS records explained: A, CNAME, MX, TXT and more

Last updated: 31 December 2025

What are DNS records?

DNS records are instructions that tell internet traffic where to go. They link domain names to IP addresses and other services. Without DNS, you could only reach websites via IP addresses.

The most important DNS records

A record

The most commonly used record. Links a domain name to an IPv4 address.

Example:

example.com    A    93.184.216.34

Use: point website to server

AAAA record

Same as A record, but for IPv6 addresses.

Example:

example.com    AAAA    2606:2800:220:1:248:1893:25c8:1946

Use: IPv6 support for your website

CNAME record

Creates an alias to another domain. Cannot coexist with other records on the same subdomain.

Example:

www.example.com    CNAME    example.com

Use: redirect subdomains, CDN integration

MX record

Determines which mail server receives email for your domain. Priority determines order with multiple mail servers.

Example:

example.com    MX    10    mail.example.com
example.com    MX    20    backup.example.com

Use: configure email

TXT record

Textual information for various purposes.

Example:

example.com    TXT    "v=spf1 include:_spf.google.com ~all"

Use:

  • SPF (spam prevention)
  • DKIM (email verification)
  • Domain verification (Google, Microsoft)

NS record

Determines which nameservers are authoritative for your domain.

Example:

example.com    NS    ns1.hostingprovider.com
example.com    NS    ns2.hostingprovider.com

Use: delegate DNS management

SOA record

Start of Authority - contains administrative information about the zone.

Contains:

  • Primary nameserver
  • Administrator email
  • Serial number
  • Refresh/retry intervals

PTR record

Reverse DNS: links IP address to domain name. Managed by your hosting provider.

Use: improve email deliverability

DNS propagation

DNS changes are not immediately visible everywhere. This is due to caching:

TTL setting Propagation time
300 (5 min) Up to 5 minutes
3600 (1 hour) Up to 1 hour
86400 (1 day) Up to 24 hours

Tip: lower TTL for migrations, increase for stability.

Common mistakes

Conflicting records

A CNAME cannot coexist with other records on the same subdomain.

Wrong priority

With MX records: lower numbers have higher priority.

Missing dot

In some DNS interfaces, domain names must end with a dot (example.com.)

Frequently Asked Questions

How long does it take to implement this?

Implementation time varies per situation. Simple configurations can be done within an hour, more complex setups may take several hours to a day.

What are the costs?

Costs depend on your hosting provider and package. Many basic features are included for free, advanced features may incur additional costs.

Do I need technical knowledge?

You need little technical knowledge for the basics. Most hosting providers offer extensive documentation and support to help you.

Was this article helpful?

Compare hosting packages directly to find the best choice for your situation.