Karachi, Pakistan Mon–Sat: 10AM–7PM PKT
Home Services
Design & Development
UI/UX Design Web Development WordPress Development Responsive Web Design Corporate Website Landing Pages / Microsites E-Commerce Solutions Mobile App Development
Marketing & Growth
SEO Services Content Marketing Social Media Marketing PPC / Google Ads Branding & Creative Speed & Performance
Hosting & Support
Web Hosting Maintenance & Support
Portfolio
Website Design Logo & Graphics
Clients About Blog Free Tools Get a Quote
Hosting & Care Guide

DNS Records Explained: A, CNAME, MX, TXT and How Propagation Works

What each DNS record does, with real examples for websites and email, how TTL and propagation work, how to check records and how to change DNS without downtime.

DNS records table with A, CNAME, MX and TXT entries

DNS records are the instructions that connect your domain name to the services behind it. An A record points the domain to your web server's IP address, a CNAME makes one name an alias of another, MX records route email, and TXT records prove ownership and protect your email from spoofing. When you change a record, the update spreads according to its TTL, which is why changes can take minutes or hours. This guide explains each record type with real examples and shows how to change DNS safely without taking your website or email down.

Key takeaways
  • Nameservers decide where your DNS is managed; records decide what your domain points to.
  • Website: A (and AAAA) or CNAME. Email: MX plus SPF, DKIM and DMARC TXT records.
  • Lower the TTL to 300 seconds a day before a planned change, then raise it again afterwards.
  • Copy every existing record before switching nameservers, or email can stop working.

DNS records: how DNS works in 30 seconds

When someone types your domain, their device asks a recursive resolver (usually run by their ISP, or a public one like 1.1.1.1 or 8.8.8.8). The resolver asks the root servers, then the servers for the extension (such as .com or .pk), which reply with your domain's nameservers. Your nameservers hold the actual records and answer with the IP address. The resolver caches that answer for the record's TTL, so the next visitor gets it instantly. Also, this matters for DNS records on every kind of site.

This is why there are two separate places to check: the registrar, where the nameservers are set, and the DNS host (often your hosting company or Cloudflare), where the records live. For domain basics, see our domains and hosting guide.

The DNS record types you will actually use

TypeWhat it doesExample value
APoints a name to an IPv4 address203.0.113.25
AAAAPoints a name to an IPv6 address2001:db8::25
CNAMEMakes a name an alias of another namewww → example.com
MXSays which servers receive email, with a priority10 mx1.mailprovider.com
TXTFree text: verification, SPF, DKIM, DMARCv=spf1 include:_spf.google.com ~all
NSLists the nameservers for a domain or subdomainns1.dns-parking.com
CAALimits which authorities may issue SSL certificates0 issue "letsencrypt.org"
SRVLocates services such as SIP or Microsoft 365 features_sip._tls 100 1 443 sipdir.online.lync.com

A and AAAA records: pointing to your server

The A record is what makes your website load. The root of the domain (often written as @) usually has an A record to the hosting server's IP address: So keep this in mind whenever you work on DNS records.

Type   Name   Value            TTL
A      @      203.0.113.25     3600
AAAA   @      2001:db8::25     3600

Only add an AAAA record if your host gives you an IPv6 address and the site actually works over IPv6. A broken AAAA record makes the site fail for some visitors on IPv6 networks while it looks fine for you.

CNAME records: aliases

A CNAME says "this name is the same as that name". It is used for www, for subdomains that point to services like Shopify or a CDN, and for verification records. In short, it is one of the simplest ways to get DNS records right.

Type    Name    Value                 TTL
CNAME   www     example.com.          3600
CNAME   shop    shops.myshopify.com.  3600

Two rules matter:

  • A name with a CNAME cannot have any other record. That is why you normally cannot put a CNAME on the root domain, which also needs MX and NS records.
  • Some providers, including Cloudflare, offer CNAME flattening or ALIAS/ANAME records that act like a CNAME at the root by returning the IP addresses directly.

MX records: where email goes

MX records point to mail servers, never to an IP address directly. The number is the priority: lower numbers are tried first.

Type   Name   Priority   Value
MX     @      1          smtp.google.com.
MX     @      10         mx1.hostinger.com.
MX     @      20         mx2.hostinger.com.

Use the MX records from one email provider only (the example above mixes two to show priorities). If old MX records from a previous host stay in place, some messages will be delivered to the wrong mailbox. Our business email guide covers choosing a provider.

TXT records: SPF, DKIM, DMARC and verification

TXT records carry text that other systems read. Three of them decide whether your email lands in the inbox or spam:

RecordNameExample
SPF@v=spf1 include:_spf.google.com ~all
DKIMgoogle._domainkeyv=DKIM1; k=rsa; p=MIIBIjANBg...
DMARC_dmarcv=DMARC1; p=none; rua=mailto:dmarc@example.com
  • Have only one SPF record per domain. If you use two senders, merge them: v=spf1 include:_spf.google.com include:servers.mcsv.net ~all.
  • SPF allows at most 10 DNS lookups. Too many include: entries make it fail silently.
  • Start DMARC at p=none to collect reports, then move to quarantine and reject once all legitimate senders pass. Gmail and Yahoo require DMARC for bulk senders.

Google Search Console, Meta Business and Microsoft 365 also ask you to add a TXT record to prove you own the domain. These are safe to leave in place.

TTL and propagation: why changes take time

TTL (time to live) is how many seconds resolvers may cache a record. A TTL of 3600 means a resolver that looked up your domain one minute before your change may keep using the old IP address for up to an hour.

  • Record changes usually reach most visitors within the old TTL, often minutes.
  • Nameserver changes depend on the TLD's own TTL and commonly take a few hours, sometimes up to 24 to 48 hours.
  • "Propagation" is not a push; it is caches expiring around the world at different times.

Before a planned move, lower the TTL to 300 (five minutes) at least one old-TTL period in advance. After the change is stable, set it back to 3600 or higher to reduce lookups.

How to check DNS records

From Windows PowerShell or Command Prompt:

nslookup -type=A example.com
nslookup -type=MX example.com
nslookup -type=TXT _dmarc.example.com 8.8.8.8

From macOS or Linux:

dig example.com A +short
dig example.com MX +short
dig @1.1.1.1 example.com TXT

Querying a specific public resolver (8.8.8.8 or 1.1.1.1) shows what the rest of the internet sees, rather than your own cached answer. Online tools such as DNS Checker show results from many countries at once, which is useful during propagation. You can also use our free website tools.

DNS records: how to change DNS without downtime

  1. Export or screenshot every existing record, including MX, TXT and any subdomains.
  2. Lower TTLs to 300 a day before the change.
  3. Prepare the new server fully: website files, database, SSL certificate and email accounts.
  4. Change the record (or the nameservers, after recreating every record at the new DNS host).
  5. Keep the old server running for 48 hours so visitors with cached records still see a working site.
  6. Verify with dig or nslookup against public resolvers, test email in both directions, and check the SSL certificate.
  7. Raise TTLs again once everything is stable.
The most common outage we fix: a business switches nameservers to a new host or to Cloudflare, the website works, but email silently stops because the MX and SPF records were never copied across. Always recreate mail records first.

DNS records: frequently asked questions

What is the difference between nameservers and DNS records?

Nameservers, set at your registrar, choose which company answers DNS for your domain. Records, set at that company, say where the website and email actually are.

Should www be an A record or a CNAME?

Either works. A CNAME to the root domain is easier because you only update one IP address if the server changes.

Why does my site work on mobile data but not on Wi-Fi?

Different networks use different resolvers, and one may still have the old record cached. Wait for the TTL to expire, or flush your device's DNS cache with ipconfig /flushdns on Windows.

What does a CAA record do?

It lists which certificate authorities may issue SSL certificates for your domain. If you add one, include every authority you use, or certificate renewals will fail.

Related guides: 404 Error, 403 Forbidden Error and ERR_TOO_MANY_REDIRECTS.

For official guidance, see MDN Web Docs.

Need help with DNS or a hosting move?

We set up DNS, email authentication and hosting moves without downtime. See our web hosting service and maintenance plans, or contact us.

Written by the ItsWebExpert team, a web design and development company in Karachi building websites, online stores and apps for businesses across Pakistan.

Ask a Question on WhatsApp

Let's Build Your
Next Website

Tell us what you need and we will reply within 24 hours with honest advice and a fixed quote.

Trusted by our clients, rated 5.0 on Google

5.0 11 Google reviews Read all →
I had a great experience working with Waqas and his team. We got some website development and SEO work done, and I'm quite satisfied with the overall results. They understood our requirements, suggested improvements, and handled the work professionally. What I appreciated most was their communication, attention to detail, and willingness to make changes whenever needed. Waqas is very cooperative, and the team knows what they're doing. Definitely a good choice for anyone looking for reliable web development and digital marketing services.
HUHafiz Ubaid Google review · Nov 2026
I was referred to their company by someone, and I'm really glad I connected with them. Waqas, the CEO, is a very humble and professional person who leads his team exceptionally well. Their expertise in digital marketing, web development, and custom development services is impressive. The team is skilled, responsive, and committed to delivering quality work. Had a really positive experience working with them. Highly recommended!
MRMuhammad Rafeeq Google review · Nov 2026
I had hired them for my client's task of Custom Wordpress plugin development. and many other tasks later on.. Waqas is super fast and sharp.. I know him since 2019.. I really really appreciate his work. Highly recommended..
RFRaheela Farooqui Google review · Nov 2026
I had a positive experience working with Waqas and his team. They provided excellent support with graphic design and social media management. The team was professional, responsive, and attentive to our needs. They understood our vision and delivered quality work on time. Highly recommended for anyone looking for creative and reliable digital services.
URUsman Rock Google review · Nov 2026
I really appreciate their dedication and professionalism. They have a good understanding of SEO, social media marketing, and online brand growth. Communication is smooth, and the quality of work is impressive. Definitely a great team to work with!
SSSameer Sarafaraz Google review · Nov 2026
I've had a great experience working with their team. They understand digital marketing very well and know how to improve online visibility through effective SEO and marketing strategies. Professional, responsive, and reliable. Highly recommended! 🙌❤️
MNMohammad naveed Google review · Nov 2026
I had a really good experience with web Experts. Everything was easy to understand, well-organized, and user-friendly. I appreciate the effort and attention to detail that has gone into creating this platform. It was a smooth and pleasant experience, and I would definitely recommend it to others. Keep up the great work!
SSShazia shaikh Google review · Nov 2026
Extremely professional and committed I am Extremely happy to work with them I wish them best of luck Best Regards M. Salman Farooqui
SFSalman Farooqui Google review · Nov 2026
Outstanding experience! Quality, professionalism, and customer service are all excellent. Keep up the great work!
ARabdul rehman Google review · Nov 2026
Excellent service and a great experience. The team is professional, helpful, and dedicated. Highly recommended!
MEmustafa emb Google review · Nov 2026