Managed infrastructure for SMBs
Business DNS Records Explained for Small Businesses (A, CNAME, MX, TXT, TTL)
The short answer
DNS records are the public address book for your domain. They tell the internet which server answers for your website, where your email should be delivered and which services are allowed to send mail on your behalf. A small business only needs to understand five things: A records point a name at an IPv4 address, CNAME records make one name an alias of another, MX records say where email goes, TXT records carry text such as SPF and domain verification, and TTL controls how long other networks may remember the answer. This guide walks through them in ten steps, with example addresses and a checklist you can reuse before every change.
1. Know who runs your DNS
Two different companies are often involved. The registrar is where you bought the domain name. The DNS host is whoever runs the nameservers that answer questions about it. They can be the same company or different ones. The place to edit records is the DNS host, and the nameservers listed for your domain at the registrar decide which host that is. If you edit records in one panel but the domain points at another provider's nameservers, nothing changes. Before touching anything, run dig NS example.com +short to see which nameservers are actually in use, and log in there.
2. Learn the anatomy of a record
Every record has a name, a type, a value and a TTL. The name is the host part, such as www or mail; the symbol @ usually stands for the bare domain itself, also called the apex or root. The type says what kind of answer it is. The value is the answer. The TTL is a number of seconds. A typical entry reads: www.example.com. 3600 IN A 203.0.113.25, which says the name www.example.com points at that IPv4 address and may be cached for one hour.
3. A and AAAA records: names to addresses
An A record maps a name to an IPv4 address and an AAAA record maps a name to an IPv6 address. For a website on a server at 203.0.113.25, you would normally publish an A record for @ and one for www, both pointing at that address. Only publish an AAAA record if the server really answers on that IPv6 address, because visitors with IPv6 will try it first and a wrong AAAA record makes the site look broken for them. You can have several A records for the same name, but that is round-robin sharing, not a failover plan, so use it deliberately.
4. CNAME records: one name as an alias
A CNAME says that a name is an alias for another name, so the answer is looked up there instead. A common use is www.example.com as a CNAME to example.com, or shop.example.com as a CNAME to a hostname a service gives you. Three rules matter. A name with a CNAME cannot have any other record type at the same name. The bare domain cannot be a CNAME, because it must also hold the NS and SOA records; some providers offer an alias or flattening feature as a workaround, but that is a provider feature, not standard DNS. And the target of a CNAME is always a hostname, never an IP address.
5. MX records: where your email goes
MX records tell other mail servers where to deliver email for your domain. Each one has a priority number and a hostname, for example priority 10 and mail.example.com. Lower numbers are tried first, so a second record with priority 20 acts as a backup. The MX target must be a hostname that has its own A or AAAA record, such as mail.example.com at 203.0.113.30. It must not be an IP address and should not be a CNAME. If you use a hosted mail provider, copy its MX records exactly and remove old ones, because leftover MX records from a previous provider can send some of your mail to the wrong place.
6. TXT records: SPF, DKIM, DMARC and verification
TXT records hold free text, and several important jobs depend on them. An SPF record lists which servers may send mail for your domain. DKIM publishes a public key under a name such as selector._domainkey.example.com. DMARC lives at _dmarc.example.com and tells receivers what to do with mail that fails the checks. Services also ask you to add a TXT record to prove you own a domain. Keep exactly one SPF record per name, since two will cause SPF to fail. Our SPF, DKIM and DMARC guide covers the email records in detail.
7. TTL: how long answers are remembered
TTL is the number of seconds that resolvers and devices may cache an answer before asking again. A value of 3600 means one hour and 86400 means one day. Long TTLs reduce lookups and are fine for records that rarely change. Short TTLs let changes take effect faster. What people call propagation is mostly old cached answers expiring, so the delay after a change is roughly the old TTL, not some mysterious waiting period. Some resolvers also cache the fact that a name does not exist, which is why a record you just created can still look missing for a short while.
8. Plan changes around TTL
For a planned move, such as pointing your website at a new server, work in this order. A day or more before the move, lower the TTL on the records you will change to something like 300 seconds. Wait at least as long as the old TTL. Make the change. Test it from more than one place. When everything is stable, raise the TTL again. Keep the old server running until the old TTL has passed, so visitors who still have the old answer reach a working site. For email moves, also keep the old mailbox reachable until the new MX records are being used.
9. Check your records from the command line
Use dig (or nslookup on Windows) to see what the world sees, rather than what your control panel says. Useful checks include:
dig example.com A +short
dig www.example.com CNAME +short
dig example.com MX +short
dig example.com TXT +short
dig example.com A @8.8.8.8 +noall +answer
The last example asks a specific public resolver and shows the remaining TTL counting down. Ask your authoritative nameserver directly (for example dig example.com A @ns1.example.net) to see the true current value without any cache in the way.
10. Keep records tidy and documented
Most DNS trouble comes from records nobody remembers. Keep a simple list of every record with a note on what it is for and who asked for it. Delete records for services you no longer use, because a dangling CNAME that points at a service you have cancelled can be claimed by someone else. Protect the registrar and DNS accounts with a strong password and two-factor sign-in, turn on registrar lock if it is offered, and make sure renewal reminders go to a mailbox more than one person reads. Export or screenshot the zone before every change so you can put it back.
Quick checklist
- Nameservers checked with dig NS, and edits made at the DNS host actually in use
- A record for the bare domain and www pointing at the right server
- AAAA record published only if the server really answers on IPv6
- CNAME not used at the bare domain or alongside other records at the same name
- MX records match the mail provider, with a hostname target and sensible priorities
- One SPF record, DKIM and DMARC published as TXT records
- TTL lowered before a planned change, raised again afterwards
- Results checked with dig against the authoritative nameserver and a public resolver
- Old and unused records removed, a copy of the zone saved before each change
- Registrar and DNS accounts protected with two-factor sign-in and monitored renewals
DNS is only one part of a reliable setup. Pair it with HTTPS in front of your apps, certificate renewal and uptime monitoring, so a wrong record is noticed quickly rather than by a customer.
Next steps
GlassHosting is a managed service and infrastructure provider: we run your servers on our own network, so you can run your business. If you would rather not manage servers, certificates and the records that point at them yourself, read what managed hosting includes and managed vs unmanaged VPS, browse the plans, then tell us what you run or email sales@glasshosting.com.
Host with GlassHosting
Order a plan or browse the knowledgebase for deeper how-tos.