EN · $ USD
Domains, DNS and SSL

What Are DNS Records? A Guide to A, CNAME, MX and TXT Records

7 min read Updated: Sunucu Atlas technical team

In short

DNS records are instructions that tell the internet where requests for a domain should go. An A record points a domain to an IPv4 address and AAAA to an IPv6 address; CNAME points one name to another name; MX says which server receives the domain's email; and TXT holds SPF, DKIM, DMARC and verification data. Records are managed in the DNS zone where the domain's nameservers point, for example in cPanel Zone Editor.

In this guide
  1. How Does DNS Work? A Quick Overview
  2. Core DNS Record Types
  3. Example: A Typical Business DNS Zone
  4. How to Add a DNS Record in cPanel Zone Editor
  5. Common DNS Mistakes
  6. Next Step: Manage DNS on Ready-to-Use Infrastructure

DNS records are the lines that define how a domain behaves on the internet: they tell visitors' browsers which server to reach when someone types firmaniz.com, where email sent to info@firmaniz.com should be delivered, and hold the information that proves you own the domain. The most common ones are A, CNAME, MX and TXT records. In this guide we explain each with real website and email scenarios, show how to add them in cPanel Zone Editor, and cover the most common mistakes.

How Does DNS Work? A Quick Overview

DNS (Domain Name System) is a distributed system that translates domain names into the IP addresses computers use. A domain's records are kept in one place: its authoritative DNS servers (nameservers). Which nameservers are authoritative is set at the registrar where you bought the domain.

So the first rule is: edit records where the domain's nameservers point. If the nameservers point to your hosting provider, records are managed in Zone Editor in cPanel; if they point to another DNS service, you manage them in that service's dashboard. Changes made anywhere else have no effect.

Every record also has a TTL (Time To Live) value. TTL tells other DNS servers how long, in seconds, to cache the record. A value of 14400 means 4 hours; a change can take that long to show up everywhere.

Core DNS Record Types

RecordWhat it doesExample value
APoints a name to an IPv4 address203.0.113.10
AAAAPoints a name to an IPv6 address2001:db8::10
CNAMEPoints a name to another name (alias)firmaniz.com.
MXSpecifies the server that receives email10 mail.firmaniz.com.
TXTFree-form text: SPF, DKIM, DMARC, verificationv=spf1 +a +mx ~all
NSLists the domain's authoritative nameserversns1.ornek-dns.com.
CAARestricts which certificate authorities can issue SSL0 issue "letsencrypt.org"
SRVSpecifies the server and port for a specific service0 5 443 sunucu.firmaniz.com.

The IP addresses in these examples come from ranges reserved for documentation; in your own records, use the addresses your hosting provider gives you.

A and AAAA records: Pointing a website to a server

The A record is the most fundamental DNS record. An A record for firmaniz.com tells the browser "this site's server is at this IPv4 address." For the root domain, the record name is usually shown as @ or as the domain itself. If your server supports IPv6, you also add an AAAA record for the same name. When you move your site to a different host, this is usually the record you change.

CNAME record: Pointing one name to another

A CNAME (Canonical Name) record points a subdomain to another domain name instead of an IP. The most common example is pointing www.firmaniz.com to firmaniz.com with a CNAME; when the root domain's IP changes, www follows automatically. Online store, form and email marketing services also typically ask you for a CNAME record.

There are two important rules: you can't add a CNAME on the root domain (@), because NS and SOA records already live there. Also, a name that has a CNAME can't have any other record with the same name (such as MX or TXT).

MX record: Where email goes

An MX (Mail Exchanger) record tells sending servers which server should receive email for @firmaniz.com addresses. Each MX record has a priority value; the lowest number is tried first. For example, if the server with priority 10 is unreachable, the sending server tries the one with priority 20.

An MX record must point to a hostname, not an IP address, and that hostname must have an A or AAAA record, not a CNAME. This is what makes it possible to host your website in one place and your email in another: the A record points to the web server, and the MX record points to the mail server.

TXT record: SPF, DKIM, DMARC and verification

TXT records hold free-form text, but today their most critical job is email security:

  • SPF: Lists which servers are allowed to send email on behalf of your domain. A domain should have only one SPF record.
  • DKIM: Publishes the public key used to verify the digital signature of outgoing email; it usually sits under a name like default._domainkey.
  • DMARC: Under the _dmarc name, it specifies what to do with email that fails SPF and DKIM checks.
  • Verification: Services like Google Search Console verify domain ownership with a TXT record.

We cover how to build these record values step by step in our guide to creating SPF, DKIM and DMARC records.

NS, CAA and PTR: Lesser-known but important records

NS records show which nameservers manage the domain and should normally match the setting at your registrar; you don't need to change them by hand inside the zone. A CAA record ensures only the certificate authorities you list can issue SSL certificates for your domain; if you add one, include your free SSL provider in the list too, or certificate renewal will fail. A PTR (reverse DNS) record works in the opposite direction: it maps an IP address to a name. This record isn't set in the domain's zone but by the provider that owns the IP address, and it's critical for deliverability if you run your own mail server. For details, see our PTR record guide.

Example: A Typical Business DNS Zone

For a domain whose website and email are on the same hosting account, the zone file looks roughly like this:

firmaniz.com.          14400  IN  A      203.0.113.10
www.firmaniz.com.      14400  IN  CNAME  firmaniz.com.
mail.firmaniz.com.     14400  IN  A      203.0.113.10
firmaniz.com.          14400  IN  MX     0 mail.firmaniz.com.
firmaniz.com.          14400  IN  TXT    "v=spf1 +a +mx ~all"
_dmarc.firmaniz.com.   14400  IN  TXT    "v=DMARC1; p=none; rua=mailto:dmarc@firmaniz.com"

The trailing dot at the end of a name means the name is fully qualified (absolute). The cPanel interface usually adds this dot for you.

How to Add a DNS Record in cPanel Zone Editor

  1. Log in to cPanel and click the Zone Editor icon in the Domains section.
  2. Click Manage on the row of the domain you want to edit.
  3. Choose the record type (A, CNAME, MX, TXT, etc.) from the Add Record menu.
  4. Enter the record name in the Name field. For the root domain, enter the domain itself; for a subdomain, enter something like shop; cPanel completes the full name.
  5. You can leave TTL at the default. If you plan to make a change soon, lowering it in advance speeds up propagation.
  6. Enter the value in the Record field: the IP address for A, the target domain for CNAME, the text itself for TXT. For MX, priority and destination server are separate fields.
  7. Click Save Record and verify the change from the command line.

To check how the record looks to the rest of the world:

# Windows (Command Prompt or PowerShell)
nslookup -type=MX firmaniz.com
nslookup -type=TXT firmaniz.com

# Linux / macOS
dig A firmaniz.com +short
dig MX firmaniz.com +short
dig TXT _dmarc.firmaniz.com +short

The Email Routing option in cPanel also matters: if your MX record points to an external service and you don't set routing to Remote Mail Exchanger, messages sent from the same server may never reach the external service.

Common DNS Mistakes

  • Editing records in the wrong place: Making changes in cPanel while the nameservers point elsewhere. First check the authoritative servers with nslookup -type=NS firmaniz.com.
  • Two separate SPF records: Creating a second v=spf1 record when adding a new sending service invalidates SPF. Add to the existing record instead.
  • Pointing an MX record to an IP address or a CNAME: The MX target must be a name with an A record.
  • Trying to add a CNAME on the root domain: Use an A record for the root domain, and prefer a CNAME for www.
  • Pasting a long DKIM key in broken pieces: If spaces or line breaks get added while copying, the signature won't verify.
  • Expecting results right after a change: Old records can stay cached for the TTL period; for details, see our article on how long DNS propagation takes.

Next Step: Manage DNS on Ready-to-Use Infrastructure

With Sunucu Atlas web hosting plans, you manage your domain's DNS zone yourself through cPanel Zone Editor; the LiteSpeed web server and a free SSL certificate are included. If you only need business email without a website, take a look at the email hosting plans with Roundcube webmail, IMAP/POP3/SMTP (SSL), the SpamAssassin spam filter, and SPF and DKIM support. For a small team, SA-MAIL-2 with 25 email accounts is a good start; if you get stuck setting up MX and TXT records, open a support ticket for help in Turkish.

Frequently asked questions

What's the difference between an A record and a CNAME record?

An A record points a name directly to an IPv4 address, while a CNAME points a name to another domain name. The root domain typically uses an A record, and subdomains like www usually use a CNAME.

Can a domain have more than one MX record?

Yes. Each MX record has a priority value, and the sending server tries the lowest-numbered record first, then moves to the next one if it can't connect.

What should the TTL value be?

For everyday use, defaults in the range of hours are fine. If you plan an IP or MX change, lowering the TTL to something like 300 seconds a few days in advance speeds up the switchover.

I added a DNS record but nothing changed. Why?

Either the record was edited in a different dashboard instead of on the authoritative nameservers, or the old record is still cached for its TTL. Use nslookup or dig to check the NS records first, then the record in question.

What happens if a domain has two SPF records?

The SPF check returns an error, and your email may land in spam or be rejected. Merge all sending sources into a single v=spf1 record.

For this guide

Recommended plans

Sunucu Atlas web hosting and email hosting plans let you manage your A, MX and TXT records yourself in cPanel and run business email with SPF and DKIM support from one place.

SA-CP-1

cPanel
Recommended

20 GB NVMe disk

$0.39/mo

+VAT

  • Memory1 GB
  • LocationIstanbul
  • 1 Hosted Domains
  • 50 GB Traffic
  • 5 Email Account Limit
  • 2 Databases

SA-CP-2

cPanel

40 GB NVMe disk

$0.69/mo

+VAT

  • Processor2 cores
  • Memory2 GB
  • LocationIstanbul
  • 1 Hosted Domains
  • 100 GB Traffic
  • 10 Email Account Limit
  • 5 Databases

SA-CP-3

cPanel

60 GB NVMe disk

$0.98/mo

+VAT

  • Processor3 cores
  • Memory3 GB
  • LocationIstanbul
  • 1 Hosted Domains
  • 200 GB Traffic
  • 25 Email Account Limit
  • 10 Databases

Web Hosting — all plans Mail Hosting — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.