Domains and DNS Explained for Website Owners
Domains and DNS cause more website emergencies than almost anything else. A site that suddenly disappears, email that stops arriving, a new host that "doesn't work": very often the code is fine and the problem is a DNS record. This guide explains how domains and DNS work in plain language, which records matter, and how to make changes without taking a site offline.
Three things that are often confused
- The domain registrar is the company where the domain is registered and renewed, such as Namecheap, GoDaddy or Cloudflare Registrar. You pay them yearly to keep the name.
- The DNS host is where the domain's records live. It is set by the domain's nameservers. Often it is the registrar, but it can also be your web host, Cloudflare or another provider.
- The web host is the server that delivers the website files.
These can be three different companies. When something breaks, the first question is always: where are the nameservers pointing? That tells you where to edit the records. Changing a record at the registrar has no effect if the nameservers point somewhere else.
The DNS records you actually need
| Record | What it does | Typical example |
|---|---|---|
| A | Points a name to an IPv4 address | @ → 203.0.113.10 |
| AAAA | Points a name to an IPv6 address | @ → 2001:db8::10 |
| CNAME | Makes one name an alias of another name | www → example.com or a platform host |
| MX | Says which servers receive email | Google Workspace or Microsoft 365 servers |
| TXT | Holds text for verification and email security | SPF, DKIM, DMARC, ownership checks |
| NS | Says which DNS host is authoritative | Usually set at the registrar |
The @ symbol means the bare domain, such as example.com. A CNAME cannot be used on the bare domain at most DNS hosts, which is why platforms ask for A records on @ and a CNAME on www.
TTL and "propagation"
Every record has a TTL, a time to live in seconds. It tells other servers how long they may cache the answer. A TTL of 3600 means a change may take up to an hour to be seen everywhere, sometimes longer when providers ignore short values.
That waiting period is usually called propagation. Use it to your advantage: a day before a planned change, lower the TTL to 300 seconds. Make the change, check everything works, then raise the TTL again.
Moving a website to a new host without downtime
- Lower the TTL of the A and CNAME records a day in advance.
- Set up the site completely on the new host and test it using a temporary address or your computer's hosts file.
- Prepare HTTPS on the new host, or make sure it can issue a certificate as soon as DNS points to it.
- Change only the website records (A, AAAA, CNAME). Leave MX and email TXT records exactly as they are.
- Keep the old hosting active for a few days, until traffic has fully moved.
- Raise the TTL again.
The full checklist for a provider change is in How to Switch Web Design Companies Without Losing Your Website.
Email records you should not break
Many "website" DNS changes accidentally break email. Before editing, export or screenshot the full zone. Pay special attention to:
- MX records, which decide where mail is delivered.
- SPF, a TXT record that lists which servers may send mail for the domain. A domain should have only one SPF record.
- DKIM, a TXT or CNAME record that lets receivers verify signed messages.
- DMARC, a TXT record on
_dmarcthat tells receivers what to do with mail that fails the checks. Large mail providers now expect it for bulk senders.
If a contact form on the website sends email, make sure the sending service is included in SPF and signs with DKIM, or form messages will land in spam.
Common problems and how to fix them
"I changed the record and nothing happened"
- You edited records at a provider that is not the DNS host. Check the nameservers.
- The old value is still cached. Check with an online DNS lookup tool from several locations, and wait for the TTL.
- There are two conflicting records, for example an old A record left next to the new one. Remove the old one.
"The site works with www but not without it" (or the opposite)
One of the two names has no record, or the host is only set up for one. Add both, then redirect one to the other so there is a single main address.
"HTTPS shows a certificate error after the move"
The new host cannot issue a certificate until DNS points to it. Wait for the change to be seen, then request the certificate again. Some platforms show a "pending" status for a few hours.
"Email stopped after we changed hosts"
The MX records were replaced or deleted, or the nameservers were moved to a new DNS host that does not have the email records. Restore them from your copy of the old zone.
Keeping control of the domain
A domain is a business asset, and losing it is far worse than any server problem.
- Register the domain in the owner's name and with the owner's email, not a freelancer's or an agency's account.
- Turn on auto-renewal and keep a valid payment method on file.
- Use two-factor authentication at the registrar.
- Keep the registrar lock on, and only unlock it during a planned transfer.
- Write down where the domain is registered, where DNS is hosted and who has access.
Expired domains are often bought by others within days, partly because old domains carry links and authority. Domain Authority Metrics Explained covers why those links matter.
Choosing a domain name
- Short, easy to say and easy to spell after hearing it once.
- .com for international audiences, a country domain for a local business.
- Avoid hyphens and numbers unless they are part of the brand.
- Check social media handles and trademarks before buying.
- Before buying a domain that was used before, check its history in the Wayback Machine for spam.
A quick DNS checklist for every new site
- Know where the domain is registered and where DNS is hosted.
- Set A or CNAME records for both the bare domain and www.
- Choose one main address and redirect the other.
- Make sure HTTPS works on both.
- Set up MX, SPF, DKIM and DMARC if the domain sends or receives email.
- Turn on auto-renewal, two-factor login and the registrar lock.
For the hosting side of a new site, see How to Choose Web Hosting and Basic Server Setup for a Small Website.
Comments
Post a Comment