DNS records explained: A, CNAME, MX and TXT

DNS is the address book of the internet. When someone types your domain, DNS records tell their computer where the website lives, where email should go, and prove things like domain ownership. Your domain's records together are its zone.

The record types you'll meet

Type What it does Example
A Points a name to an IPv4 address example.co.za → 197.0.2.10
AAAA Same as A, for IPv6 addresses example.co.za → 2001:db8::10
CNAME Points a name to another name (an alias). The target's A record is then used www.example.co.za → example.co.za
MX Where email for the domain is delivered. Has a priority; the lowest number is tried first example.co.za → mail.example.co.za, priority 0
TXT Free text. Used for SPF, DKIM, DMARC and ownership verification v=spf1 +a +mx ~all
NS Which nameservers are authoritative for the zone dns1.webway.host, dns2.webway.host
SRV Location of a specific service, used by some chat and phone systems _sip._tls.example.co.za → sipdir.online.lync.com
CAA Which certificate authorities may issue SSL certificates for the domain 0 issue "letsencrypt.org"

Two rules worth knowing:

  • A CNAME can't share a name with any other record. The bare domain (example.co.za) needs an A record, not a CNAME, because it also has MX, NS and TXT records.
  • One SPF record per domain. Two records starting v=spf1 break SPF entirely.

What a Webway hosting zone looks like

When your domain uses dns1.webway.host and dns2.webway.host, your zone is created with roughly these records:

Name Type Value Purpose
example.co.za A your server's IP The website
www A or CNAME same IP or example.co.za www version of the site
mail A your server's IP Email server name used in devices
ftp A or CNAME same FTP access
example.co.za MX mail.example.co.za Deliver email to this server
example.co.za TXT v=spf1 … SPF: which servers may send mail for you
default._domainkey or similar TXT v=DKIM1; … DKIM signing key
_dmarc TXT v=DMARC1; … DMARC policy, if you've added one

Creating a subdomain in the control panel adds its record for you.

Names: @, www and full names

  • @ or the bare domain means the domain itself: example.co.za.
  • www means www.example.co.za. cPanel's Zone Editor shows full names ending in a dot (www.example.co.za.). DirectAdmin's DNS Management takes the short name and adds the domain.
  • A trailing dot on a value (mail.example.co.za.) means "this is a complete name, don't add the domain". If your editor adds the domain unexpectedly, that dot is why.

TTL and propagation

Every record has a TTL (time to live), in seconds, usually 14400 (4 hours). It tells the world how long to remember the record before checking again. After you change a record, some visitors see the old value until their copy expires. Lower the TTL to 300 a day before a planned change to speed this up. See How long does DNS propagation take?

Which record for which job

I want to… Change
Point the website to another server The A record for @ and www
Point a subdomain (shop.) to another service Add an A record with their IP, or a CNAME with the name they give you
Use Google Workspace or Microsoft 365 for email The MX records, plus TXT for verification and SPF. See How to use Google Workspace or Microsoft 365 email with my Webway domain
Verify my domain with Google, Facebook or Microsoft Add a TXT record at @ with the value they give you
Stop my mail being marked as spam TXT records for SPF, DKIM and DMARC. See How to set up SPF, DKIM and DMARC for my domain
Move the whole domain to Webway Change the nameservers at your registrar, not individual records. See Point my domain to Webway (change nameservers)

Where do I edit these?

Records live wherever your nameservers point. If your nameservers are dns1/dns2.webway.host, edit them in your control panel. See How to edit my DNS records. If they're Cloudflare's or your registrar's, edit them there; the control panel's zone editor then has no effect.

Check with an online "NS lookup" tool: enter your domain and look at the NS records.

Did this answer it?