Domains

DNS Records Explained: A, CNAME, MX, TXT, and More

by dotCanada Team
DNS Records Explained: A, CNAME, MX, TXT, and More

Every time someone types your domain into a browser, a behind-the-scenes lookup happens in milliseconds. The Domain Name System (DNS) translates your human-readable domain name into the numeric IP address that computers actually use to find your server. DNS records are the entries in that system - and understanding them puts you in control of where your domain points for your website, email, and other services.

A Record (Address Record)

The A record is the most fundamental DNS record. It maps your domain name to an IPv4 address - a four-number string like 185.45.12.8. When someone visits yourdomain.ca, their browser finds the A record, gets the IP address, and connects to that server.

You typically set an A record for your root domain (yourdomain.ca) and often for the www subdomain as well. If you move your website to a new server, updating the A record is how you point your domain to the new location.

AAAA Record (IPv6)

The AAAA record works exactly like an A record but for IPv6 addresses - the newer, longer address format that looks like 2001:0db8:85a3::8a2e:0370:7334. Most websites still rely primarily on IPv4, but having AAAA records set is good practice as IPv6 adoption grows.

CNAME Record (Canonical Name)

A CNAME record creates an alias from one domain name to another. Instead of pointing to an IP address, it points to another hostname. For example, you might set www.yourdomain.ca as a CNAME pointing to yourdomain.ca. This means www always follows wherever yourdomain.ca points, without needing its own IP address.

CNAMEs are also commonly used for subdomains. If you connect your domain to a third-party service - like a Mailchimp landing page or a Shopify store - they will give you a hostname to use as a CNAME target.

One important rule: you cannot use a CNAME on your root domain (yourdomain.ca without www). The root domain must use an A record.

MX Record (Mail Exchange)

MX records tell the internet where to deliver email for your domain. When someone sends a message to hello@yourdomain.ca, their email server looks up the MX records to find out which mail server accepts mail for that domain.

MX records have a priority number - lower numbers are tried first. If you use Google Workspace, Microsoft 365, or a hosting-provided mail server, you will be given specific MX records to enter. Getting these right is critical; incorrect MX records mean your email will not be delivered.

TXT Record (Text Record)

TXT records store arbitrary text information about your domain. They are used for several important purposes:

Domain verification - Google, Microsoft, and other services ask you to add a TXT record to prove you own the domain before they activate their services.

SPF (Sender Policy Framework) - An SPF record lists which mail servers are allowed to send email on behalf of your domain. Without it, your outgoing emails are more likely to be marked as spam.

DKIM (DomainKeys Identified Mail) - A cryptographic signature that proves your outgoing emails have not been tampered with in transit. Your mail provider gives you the DKIM TXT record to add.

DMARC - A policy record that tells receiving mail servers what to do when SPF or DKIM checks fail.

NS Record (Nameserver)

NS records identify which nameservers are authoritative for your domain - in other words, which servers hold your DNS records. When you register a domain with one company and host it with another, you update the NS records at your registrar to point to your hosting provider's nameservers. All other DNS records are then managed at the hosting provider.

TTL (Time to Live)

Every DNS record has a TTL value, measured in seconds. This tells DNS resolvers how long to cache the record before checking again. A TTL of 3600 means the record is cached for one hour. If you are planning to change DNS records - like moving to a new host - lower your TTL to 300 a day before making the change. This speeds up propagation so the change takes effect everywhere within minutes rather than hours.

Editing DNS Records in cPanel

In cPanel, go to Domains > Zone Editor. You will see all the DNS records for your domain and can add, edit, or delete them. Changes typically propagate within a few minutes to a few hours depending on TTL settings and your ISP's caching.

Common Mistakes to Avoid

  • Deleting existing records without checking what they do - especially TXT records for email authentication
  • Setting a CNAME on the root domain - this will break your website and email
  • Forgetting to update MX records after switching email providers
  • Not lowering TTL before a migration, which can cause extended downtime

DNS is not complicated once you understand what each record type does. When in doubt, document your current settings before making any changes.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today