What DNS actually does
Think of DNS as the internet's address book. You type a domain name into a browser, but computers actually communicate using numerical IP addresses, not words. DNS is the system that looks up the domain name you typed and translates it into the specific instructions needed to actually reach the right server, mailbox, or service. A DNS record is one entry in that address book, and different record types exist because domains need to point different kinds of traffic (web visitors, email, verification requests) to different places.
A record
An A record points a domain or subdomain directly to an IP address, the actual numerical location of a server. This is the most direct kind of DNS record: your domain, pointed straight at the server hosting your website. If that server's IP address ever changes, for instance after a migration, the A record needs to be updated to match, or your domain keeps pointing at the old location.
CNAME record
A CNAME record points a subdomain to another domain name, rather than directly to an IP address. It's an alias: "whatever address this other domain currently resolves to, use that." The advantage is that if the target domain's underlying IP address changes, everything pointing to it via CNAME keeps working automatically, without you needing to update anything. This is commonly used for things like pointing a subdomain at a third-party service, where you don't control or need to track that service's actual server IP address yourself.
One technical rule worth knowing: a CNAME generally can't be used on your root domain (yourbusiness.co.za itself) alongside other record types like MX for email, which is why root domains typically use an A record, with CNAME reserved for subdomains like www.
MX record
MX, or Mail Exchange, records tell the internet which mail servers handle email for your domain. When someone sends a message to you@yourbusiness.co.za, the sending server looks up your domain's MX records to find out where to actually deliver it. MX records include a priority number, and mail delivery is attempted to the lowest number first, falling back to higher-numbered servers if the primary one doesn't respond. This is how businesses maintain a backup mail path in case a primary mail server is temporarily unreachable.
TXT record
A TXT record holds arbitrary text attached to your domain, and has become the general-purpose record type for anything that doesn't need its own dedicated record format. The two most common uses: verifying you own a domain for services like Google Search Console, and publishing email authentication policies like SPF, DKIM, and DMARC, which tell receiving mail servers your outgoing email is legitimate. A domain can, and usually does, have several TXT records active at once for different purposes.
| Record | Points to | Typical use |
|---|---|---|
| A | An IP address | Pointing your domain directly at your web server |
| CNAME | Another domain name | Aliasing a subdomain to a third-party service or www to your root domain |
| MX | A mail server, with priority | Telling the internet where to deliver your email |
| TXT | Arbitrary text | Domain verification, SPF, DKIM, DMARC |
A note on TTL
Every DNS record has a TTL, time to live, measured in seconds, which controls how long other servers around the internet are allowed to cache that record before checking for updates again. A high TTL means faster lookups day to day but slower propagation if you change the record. A low TTL means the opposite: any change you make takes effect faster everywhere, at the cost of slightly more frequent lookups. It's common practice to lower the TTL on a record a day or two before you know you'll be changing it, specifically so the change propagates quickly once you make it.
Common real-world scenarios
- Setting up business email with Google Workspace or Microsoft 365: add the MX records they provide, plus a TXT record for SPF covering their sending servers.
- Pointing www at your root domain: a CNAME record on the www subdomain pointing to your root domain, or in some setups an A record with the same IP.
- Verifying ownership for Google Search Console: add the specific TXT record Google provides to your domain's DNS.
- Connecting a subdomain to a third-party app or service: a CNAME pointing that subdomain at the address the third party gives you.
Manage your own records, free
Every domain registered with WebSpaceBar includes free DNS management, so you can add or edit A, CNAME, MX, and TXT records yourself, or have our engineers do it for you.
Frequently asked questions
What is the difference between an A record and a CNAME record?
An A record points a domain or subdomain directly to a specific IP address. A CNAME record points a subdomain to another domain name instead of an IP address, so if that target domain's IP address ever changes, the CNAME keeps working automatically without needing to be updated.
What is an MX record used for?
An MX, or Mail Exchange, record tells the internet which mail servers are responsible for receiving email sent to your domain. Each MX record includes a priority number, and mail servers attempt delivery to the lowest priority number first, falling back to higher numbers if that server is unavailable.
What is a TXT record and why does my domain need one?
A TXT record holds arbitrary text data attached to your domain, most commonly used for verifying domain ownership with services like Google, and for publishing SPF, DKIM, and DMARC email authentication policies. A domain can have multiple TXT records for different purposes at once.
Can I put a CNAME record on my root domain?
Generally no. DNS standards don't allow a CNAME record to coexist with other record types at the same name, and the root domain typically needs additional records like MX for email, which makes a CNAME at the root impractical. Root domains usually use an A record instead, with CNAME reserved for subdomains like www.