Tutorial

How to configure DNS records: A, CNAME, MX, TXT explained with examples

Practical guide to configuring DNS records for your domain: A, AAAA, CNAME, MX, TXT (SPF/DKIM/DMARC), and NS. Real-world examples with cPanel and Cloudflare.

Published 2026-07-15· 6 min read· Hostiger Editorial

DNS records tell the internet where to find your domain. Get them wrong and email lands in spam, sites don't load, and SSL certificates fail to issue. This guide covers the 6 record types you'll actually need.

A record — IPv4 address

Points a hostname to an IPv4 address. This is the most common record.

Type: A
Name: @         (means the root domain, e.g. example.com)
Value: 192.0.2.10
TTL: 3600

For subdomains, use the subdomain name:

Type: A
Name: www
Value: 192.0.2.10

AAAA record — IPv6 address

Same as A, but for IPv6. Every Hostiger VPS (except Istanbul) includes a /64 IPv6 block.

Type: AAAA
Name: @
Value: 2001:db8::1

CNAME record — alias to another hostname

Points one hostname to another. Common for www or CDN endpoints.

Type: CNAME
Name: www
Value: example.com.
TTL: 3600

Important: CNAME can only be used on subdomains, never on the root domain. For the root, use A or ALIAS.

MX record — where to send email

Tells the internet which servers accept mail for your domain. Lower priority = higher preference.

Type: MX
Name: @
Priority: 10
Value: mail.example.com.
TTL: 3600

Multiple MX records provide failover. If mail.example.com is unreachable, senders try the record with the next-lowest priority.

TXT record — arbitrary text (mostly authentication)

TXT records hold strings. Most common uses:

NS record — which nameservers control this domain

Usually set at your domain registrar, not in the zone editor. Points to authoritative nameservers:

Type: NS
Name: @
Value: ns1.hostiger.com.

DNS propagation — how long until it works?

New records propagate globally in 5-60 minutes typically. Some ISPs cache DNS for the TTL you set (default 3600 = 1 hour). If you're planning a change, lower TTL to 300 several hours in advance.

Check propagation with:

dig example.com
dig +trace example.com   # follow the full chain
nslookup example.com 8.8.8.8   # check against Google DNS

Common DNS mistakes

Every Hostiger domain comes with a free zone editor. For advanced routing (geo, load balancing, DNSSEC), Cloudflare is a solid free alternative.

Ready to try Hostiger? Deploy a VPS in under 60 seconds.

View VPS plans