
In this article
DNS is the address book of the internet. It turns your domain name into the server that hosts your website, and tells other systems where to deliver your email. One wrong record can take your site or your email offline, and a stolen record can send your visitors somewhere else.
This applies to every domain, whichever platform you use: WordPress, Shopify, Wix, Squarespace, Webflow or custom hosting. The records are the same everywhere; only the screen you edit them on differs.
Where DNS records live
Records are kept at your DNS provider. That is usually your domain registrar, your hosting company or a service such as Cloudflare. The place that controls your nameservers is the place where you edit records, and it is not always the company you bought the domain from.
The records you will meet most
- A record: points a name to an IPv4 address, for example
example.com → 203.0.113.10. This is how your main site is found. - AAAA record: the same, for an IPv6 address.
- CNAME record: makes one name an alias of another, such as
www → example.comorshop → shops.example-platform.com. A CNAME cannot sit on the bare domain next to other records. - MX record: says which servers receive email for your domain, with a priority number. Lower numbers are tried first.
- TXT record: free text used for proof and policy, such as domain verification, SPF and DMARC. See SPF, DKIM and DMARC explained.
- NS record: names the nameservers that are in charge of the domain.
- CAA record: lists which certificate authorities may issue SSL certificates for your domain.
TTL: how long a change takes
Each record has a TTL (time to live), in seconds. It tells resolvers how long to remember the answer. A TTL of 3600 means up to an hour before everyone sees a change. Before a planned move, lower the TTL a day ahead so the switch is quick, then raise it again afterwards.
Step 1: look at what you have now
Run your domain through the DNS lookup and note the A, MX, TXT and NS records. Save a copy somewhere safe before you change anything, so you can restore it if something breaks.
Step 2: check the basics work
- The bare domain and
wwwboth resolve and lead to the same site. If not, see ERR_TOO_MANY_REDIRECTS and use the redirect checker to confirm one goes to the other. - There is at least one MX record, and it matches your email provider's current instructions.
- SPF and DMARC exist as TXT records. Test them with the SPF, DKIM and DMARC checker.
- There are two or more nameservers, so one failure does not take you offline.
Step 3: clean up
- Delete records for services you no longer use, especially CNAMEs that point to a platform you have left. An unclaimed target can be taken over by someone else, a problem called subdomain takeover.
- Remove old verification TXT records you no longer need.
- Check that no record points to an IP address you do not recognise.
Step 4: protect your DNS
- Turn on two-factor authentication and use a strong password on your registrar and DNS accounts, as covered in login security.
- Enable the registrar lock, which blocks unauthorised transfers.
- Keep the contact email current, and watch for a domain expiring: see what to do if your domain expires and the domain expiry checker.
- Consider DNSSEC if your provider offers it, which helps stop forged answers.
Warning signs of tampering
Unexpected changes to NS or MX records are a classic sign of domain hijacking or email interception. Other signs: visitors reaching a different site, email suddenly bouncing, or the SSL certificate showing an error because the name now points to the wrong server (see SSL certificate expired). If you suspect this, change your registrar and DNS passwords first, then read how to check if your website is hacked.
Common questions
How long do DNS changes take?
Usually minutes to a few hours, depending on the TTL, and rarely up to 48 hours. Old answers can stay cached until their TTL runs out.
Can I have a CNAME on my main domain?
Not on the bare domain, because it would clash with other records such as MX and NS. Use an A record, or an ALIAS or ANAME record if your provider supports one.
Why is my email not arriving after I changed hosts?
Moving the website sometimes overwrites MX records. Compare them with your email provider's instructions and restore the correct ones.
Do I need to understand all of this?
Only the basics. Know which provider holds your DNS, keep a backup copy of your records and check them after every change.
Free tools for this problem
- DNS lookup: A, AAAA, MX, NS, TXT, SOA and CAA records, with a propagation check.
- SPF, DKIM and DMARC checker: Check SPF, DKIM, DMARC and MX records so your email reaches the inbox.
- Domain expiry checker: Expiry date, registrar, status, name servers and domain age.
