GMax Mart
Home Services Pricing Portfolio FAQ Reviews Blog Support Careers Change Language

Hosting & Infrastructure

DNS records explained: A, CNAME, MX, TXT and more

· 7 min read

DNS records explained: A, CNAME, MX, TXT and more

Open your domain's DNS panel and you are faced with a grid of rows: a name, a type, a value, a number. It looks like something only a system administrator should touch, which is why most business owners avoid it until something breaks. In fact each row answers one plain question about your domain, such as “where is the website?” or “who handles the email?”. Here are DNS records explained in ordinary language, so you can read your own zone and know which row does what.

How to read any DNS record

Every record has the same four parts.

  • Name: which address this applies to. The root of your domain is written as @ in most panels, while a subdomain is written as its own label, such as shop or mail.
  • Type: the kind of answer, from the list below.
  • Value: the answer itself, such as an IP address or another hostname.
  • TTL: how many seconds other servers may remember the answer before asking again.

Together these make up your zone, which is the complete set of answers your domain gives to the internet. If you can explain the name, type and value of a row, you understand the row.

Records that point at your website

A record

Maps a name to an IPv4 address, such as 103.21.58.10. This is the record that sends visitors to your web server. A typical site has an A record for the root domain and often one for www, though many setups use a CNAME for www instead.

AAAA record

The same idea for an IPv6 address, which looks like a long string of hexadecimal groups. Many Indian mobile networks use IPv6, so if your host supports it, having both records is useful. Never guess this value; copy it from your hosting panel.

CNAME record

Points one name at another name rather than an address, for example www to example.in, or a shop subdomain to a platform's hostname. The benefit is that if the target's IP changes, you do not have to edit anything. The rule to remember: a name with a CNAME cannot also hold other records, and the root domain generally cannot use one, which is why providers offer ALIAS or ANAME alternatives.

Records that handle your email

MX record

Says which mail servers accept email for the domain. Each MX record has a priority number, and lower numbers are tried first, so a value of 1 is the primary server and 10 a fallback. Mail providers give you the exact hostnames to enter; the common mistake is entering an IP address, which MX records do not accept.

SPF, written as a TXT record

Lists which servers are allowed to send mail using your domain, which helps stop others spoofing your address. There should be exactly one SPF record. Two of them is a configuration error that can cause your genuine mail to fail checks.

DKIM, also a TXT record

Publishes a public key so receiving servers can verify that your messages were not altered and really came from your mail system. The value is long and is generated by your mail provider, usually under a name like selector._domainkey.

DMARC, another TXT record

Published at _dmarc, it tells receivers what to do with mail that fails the checks above, and where to send reports. Start with a monitoring-only policy, read the reports for a few weeks, then tighten it once you are sure all your legitimate senders pass.

Other record types you will meet

TXT record

Free-form text, used for far more than email. Google, Microsoft, Facebook and many other services ask you to add a TXT record to prove you control the domain. Keep a note of what each verification string belongs to, or you will be afraid to delete any of them later.

NS record

Names the authoritative nameservers for the zone. These are usually set at your registrar rather than inside the zone, but you may also see NS records used to delegate a single subdomain to a different provider.

SRV record

Points at a service on a specific hostname and port, used by things like VoIP systems and some collaboration tools. The name has a particular shape, such as _sip._tcp, and the value includes priority, weight, port and target. Enter exactly what the service documentation gives you.

CAA record

Lists which certificate authorities are permitted to issue certificates for your domain. It is optional and adds a layer of control, but if you add one, remember to include the authority your host uses, or certificate renewal will start failing.

PTR record

Reverse lookup, mapping an IP address back to a name. It lives with whoever owns the IP address, meaning your hosting provider, not in your domain's zone. It mostly matters if you send mail directly from your own server.

Understanding TTL before you edit anything

The TTL is a number of seconds. A value of 3600 means resolvers may cache the answer for an hour, so an edit may take that long to be seen everywhere. A low TTL such as 300 gives faster changes at the cost of slightly more lookups.

Sensible practice is to keep normal records at an hour or more, and reduce the TTL a day before a planned change so the switch takes effect quickly. Raise it again once everything is stable.

A safe way to edit your DNS zone

  1. Export or screenshot the whole zone before touching it.
  2. Change one record at a time and note why, with the date.
  3. Copy values from the provider's documentation rather than retyping them, since a single wrong character in a DKIM key breaks it silently.
  4. Watch for trailing dots, which some panels add automatically and others require you to type.
  5. After saving, check the record from outside using a public DNS lookup tool, not just your own browser.
  6. Send a test email in both directions after any mail-related change.

Keep a written copy of your zone

The most useful thing you can do after reading this is to open your DNS panel, save a copy of every record and write one line beside each explaining its purpose. That document turns your next hosting move from a guessing game into a transcription exercise. If you would rather hand it over, our team can document and manage the zone for you alongside your domain.

Frequently asked questions

What is the difference between an A record and a CNAME?

An A record gives an IP address directly. A CNAME points at another hostname and lets that name resolve the address, which is handy when the destination's IP may change.

Can I have two MX records?

Yes, and most mail providers supply several with different priorities for redundancy. What you should not have is MX records from two different mail providers at the same time.

Why does my TXT record value look so long?

DKIM keys and some verification strings are long by design. Paste them in one piece; if the panel splits long values across quoted segments, that is normal and they are joined back together.

Where do I change my DNS records?

Wherever your nameservers currently point, which may be your registrar, your web host or a DNS provider. Editing records in a panel that is not authoritative has no effect, which confuses many first-time users.

Thinking about a website?

See what a package covers and what it costs, or ask us about your own project.

Read next

Thinking…