DNS record types: A, CNAME, MX, TXT, and more
A practical reference for every DNS record type: A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, and PTR. What each one does and when to use it.
On this page
DNS records are instructions stored in your domain's zone file that tell the internet how to handle traffic for your domain-where to send web visitors, where to deliver email, and who controls the domain. Each record type serves a specific purpose.
A record
Maps a hostname to an IPv4 address. This is the most fundamental DNS record-it tells browsers where to send web traffic.
| Field | Value |
|---|---|
| Name | @ (root domain) or www or mail |
| Type | A |
| Value | IPv4 address (e.g., 195.123.456.78) |
| TTL | 3600 (1 hour) or as required |
To point yourdomain.com to your UnderHost server, set an A record for @ pointing to your server's IP address. Find your IP in CustomerPanel → Services → your service → service details.
AAAA record
Same as an A record but for IPv6 addresses. If your server has an IPv6 address, add an AAAA record pointing to it. Most web hosting setups only require an A record unless you specifically need IPv6 support.
CNAME record
Creates an alias-maps one hostname to another hostname (not an IP address). Used to point subdomains to a canonical domain.
| Common use | Example |
|---|---|
| www to root | www → yourdomain.com |
| CDN / external service | static → cdn.provider.com |
| Email service verification | mail._domainkey → provided by email provider |
You cannot have a CNAME for @ (root domain) alongside an MX or TXT record. Use an A record for the root domain and CNAME for subdomains only.
MX record
Specifies which mail servers receive email for your domain. Every domain that uses email needs at least one MX record.
| Field | Value |
|---|---|
| Name | @ |
| Type | MX |
| Priority | 10 (lower number = higher priority) |
| Value | Hostname of mail server (e.g., mail.yourdomain.com) |
On UnderHost shared hosting, the MX record is set automatically when you use our nameservers. If you manage DNS externally, set MX to point to mail.yourdomain.com with an A record for mail pointing to your server IP.
TXT record
Stores arbitrary text in your DNS zone. Used for domain verification, email authentication, and third-party service confirmations.
| Common TXT uses | Example value |
|---|---|
| SPF (email authentication) | v=spf1 include:spf.underhost.com ~all |
| Google Search Console | google-site-verification=abc123... |
| Domain ownership | Value provided by the service requiring verification |
NS record
Delegates a domain's DNS to specific nameservers. NS records are set at your domain registrar, not in the zone itself. You typically don't edit NS records directly-you change nameservers at your registrar when you want to move DNS management.
UnderHost nameservers: ns01.underhost.com / ns02.underhost.com (shared hosting) or dns1.underhost.com / dns2.underhost.com (offshore).
SPF, DKIM, and DMARC
These are TXT records that authenticate your outgoing email and reduce the chance of it landing in spam.
| Record | Purpose | Where to add |
|---|---|---|
| SPF | Lists which servers are allowed to send email for your domain | TXT record on @ |
| DKIM | Signs outgoing email with a cryptographic key so recipients can verify it came from you | TXT record on mail._domainkey (or similar) |
| DMARC | Instructs receiving servers what to do with messages that fail SPF/DKIM checks | TXT record on _dmarc |
In cPanel, go to Email → Email Deliverability to check and configure SPF and DKIM automatically.
TTL (Time to Live)
TTL is the number of seconds a DNS record is cached by resolvers before they re-check for updates. Lower TTL = changes propagate faster; higher TTL = fewer DNS lookups (slightly faster for regular visitors).
- Recommended default: 3600 (1 hour)
- Before a planned change: Lower to 300 (5 min) a few hours before, so the change propagates quickly
- After the change is stable: Raise back to 3600 or higher
Related: How to configure DNS for your domain | What is DNS propagation and how long does it take? | How to point a domain to UnderHost hosting | What nameservers should I use for UnderHost?
Verify your DNS records
Use UnderHost DNS Check to inspect A, AAAA, CNAME, MX, TXT, NS, and propagation results before troubleshooting further.





















