DNS Records Explained: A, CNAME, MX, TXT, NS in Plain English
What each DNS record type does and which one you need when you connect a website, an email service or a verification code.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
DNS is the phone book of the internet. Each record is a line that answers a question about your domain.
The record types
- A record: points a name to an IPv4 address. Used to send
yourdomain.comto your web host. - AAAA record: the same, for IPv6 addresses.
- CNAME: makes one name an alias of another name, such as
wwwpointing toyourdomain.comor to a service like a shop platform. A CNAME cannot normally sit on the bare root domain. - MX: says which servers receive email for the domain, with priorities.
- TXT: holds text used for verification and email security, such as SPF, DKIM and domain verification codes.
- NS: names the nameservers that are in charge of the domain's DNS.
TTL
Time to live is how long other servers cache an answer. A low TTL means changes spread faster.
Where to edit
Edit records only at the place your nameservers point to, which may be your registrar, your host or a service such as Cloudflare. Records elsewhere are ignored.
Common mistakes
- Two A records pointing to different servers.
- Adding a CNAME where another record already exists for that name.
- Typing the domain name twice in the record name field, such as
www.yourdomain.com.yourdomain.com. - Deleting MX or TXT records when changing hosting.
Next
See our DNS propagation guide and our MX guide.
Related guides
- How to Move a WordPress Site to a New Host or Domain: Checklist
- How to Create a Subdomain (blog.yourdomain.com, shop.yourdomain.com) and Point It Somewhere
- "Not Secure" Warning or Padlock Missing After Installing SSL (Mixed Content)
- Free SSL (Let's Encrypt) vs Paid Certificate: Which Do You Need?
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.