What Is DNS? How It Works and Real-World Applications

What is DNS and why does it affect SEO, website speed, and email? This article explains DNS A to Z, how it works, security, and optimal setup for SMEs.

dnsinternetwebseowebsitedigital marketinghostingdomainbảo mật web
Cover image: What Is DNS? How It Works and Real-World Applications
Avatar of Trung Vũ Hoàng

Trung Vũ Hoàng

Author

26/3/202610 min read

1. What is DNS? Why SMEs should care

Have you ever typed a domain name and the website loads instantly? Behind that seemingly simple experience is DNS (Domain Name System) - the Internet's phonebook that translates a domain name (e.g., hoangtrungdigital.com) into a server IP address (e.g., 203.113.x.x). Without DNS, we'd have to memorize hard-to-remember IP strings.

For SMEs, DNS directly affects page load speed, website stability, the ability to send/receive email, and SEO. A DNS query that is a few hundred milliseconds slower can add noticeable latency for users, increase bounce rate, and lower ROI on ads.

DNS is not just infrastructure tech. It is a potential bottleneck in every Digital Marketing, SEO, and website design campaign. Understanding DNS helps you optimize performance, increase conversions, and reduce downtime risk.

Takeaway: Treat DNS as the foundation of your website. The stronger the foundation, the more effective all online activities will be.

2. How does DNS work? (Domain resolution process)

When a user enters a domain name, the browser follows the DNS resolution chain to find the correct IP.

2.1 Recursive resolver

This service is usually provided by your ISP or a public DNS (8.8.8.8, 1.1.1.1). It receives the browser's question: 'What is the IP for hoangtrungdigital.com?' and goes to find the answer. It checks the DNS cache first. If it already has the answer, it replies within a few milliseconds.

2.2 Root, TLD, and authoritative servers

If the cache doesn't have it, the recursive resolver asks:

  • Root servers point to the TLD (.com, .vn).

  • TLD servers point to the domain's authoritative DNS.

  • Authoritative DNS returns the record (e.g., A record) with the exact IP.

The recursive resolver gets the result, caches it according to the TTL, and returns it to the browser. The whole process typically takes 20-120 ms with a fast DNS, but can be longer on slow networks or with poor DNS.

2.3 The role of caching and Anycast

DNS caching reduces lookup time on subsequent visits. Anycast lets DNS providers deploy many global POPs and route to the nearest server to cut latency.

Takeaway: The fewer steps and the closer to users, the faster the DNS.

3. Common DNS records (and when to use them)

DNS stores multiple 'records' that describe the services of a domain. You'll most often see:

  • A: Points a hostname to IPv4 (e.g., 203.113.1.10). Used for web servers.

  • AAAA: Points to IPv6. Recommended if your infrastructure supports IPv6.

  • CNAME: An alias that points one name to another (e.g., www -> root). Used for SaaS/CDN integrations.

  • MX: Mail exchangers for email (e.g., ASPMX.L.GOOGLE.COM). Required if you use Gmail Workspace/Exchange.

  • TXT: Stores text, commonly for SPF, DKIM, DMARC to prevent email spoofing, and for service verification.

  • NS: Specifies the authoritative DNS servers for the domain.

  • SOA: Start of Authority info: zone serial, default TTL.

  • SRV: Special services (VoIP, IM, Microsoft 365).

  • PTR: Reverse DNS (IP -> name), important for mail servers.

Tip: Keep records tidy with consistent naming conventions, especially when using many subdomains (app, cdn, img...).

Takeaway: Knowing each record prevents avoidable issues like failed mail, SSL errors, or site outages.

4. TTL, caching, and DNS propagation: get them right to avoid downtime

TTL (Time To Live) is how long a record is cached. Low TTL helps updates propagate quickly; high TTL improves lookup performance.

4.1 What TTL is reasonable?

  • Stable websites: TTL 3600-10800s (1-3 hours) balances speed and flexibility.

  • About to change hosting/CDN: temporarily reduce TTL to 300-600s 24-48 hours in advance.

  • Rarely changed records (MX, TXT): TTL 14400-86400s (4-24 hours).

4.2 What is DNS propagation?

After you change records or change NS, it takes time for recursive DNS worldwide to update. This usually takes a few minutes to 24-48 hours, depending on the old TTL and the ISP.

4.3 Avoid downtime when switching providers

  • Lower TTL to 300s 1-2 days prior.

  • Precreate identical records at the new DNS provider.

  • Switch during off-peak hours.

  • Monitor with a tracking tool right after changing NS.

Takeaway: Plan TTL to update fast without sacrificing performance.

5. How DNS impacts speed, SEO, and conversions

DNS is the first step in the page load chain. If DNS lookup is slow, TTFB will rise, dragging down Core Web Vitals.

5.1 Speed and user experience

  • Industry reports show that just 1 second of delay can significantly reduce conversion rates.

  • Optimized public DNS (1.1.1.1, 8.8.8.8) and Anycast often cut DNS lookups to 10-30 ms where a nearby POP exists.

5.2 SEO

  • Good uptime and fast responses indirectly support SEO because Google prioritizes stable experiences.

  • Implementing DNSSEC and proper configuration helps avoid indexing errors due to misrouting or interruptions.

5.3 Email & Marketing Automation

  • Correct SPF/DKIM/DMARC TXT records improve inbox rate and reduce spam placement.

  • A separate subdomain for landing pages (lp.domain.com) via CNAME isolates infrastructure and enables safe A/B testing.

Takeaway: Fast, reliable DNS helps you get more from your Ads budget and SEO efforts.

6. Which DNS provider should SMEs choose? (Quick comparison)

You can use your domain registrar's DNS, or a professional Managed DNS service with Anycast, SLA, and strong security.

Provider

Strengths

Notes

Cloudflare DNS (1.1.1.1/Managed)

Global Anycast, very fast; integrates CDN, DNSSEC, DoH/DoT

Configure page rules/SSL correctly to avoid conflicts

Google Cloud DNS / Google Domains

High reliability, easy automation; integrates with GCP

Query-based pricing; basic cloud knowledge required

AWS Route 53

Reputable, flexible routing (latency, geo); health checks

Per-zone/query pricing; technical UI

Registrar DNS (Vietnam)

Simple, low cost, Vietnamese support

Fewer advanced features; performance/Anycast varies by provider

  • Prioritize Anycast, DNSSEC, API, and query logs for growing businesses.

  • If you run multi-region, consider Route 53 or Cloudflare for latency/geo-based routing.

Takeaway: Managed DNS is worth the investment for speed, security, and availability.

7. DNS security: risks and how to mitigate them

DNS is a common target for attacks.

7.1 Common risks

  • DNS spoofing/cache poisoning: Returns a fake IP that redirects users to phishing sites.

  • DDoS against authoritative DNS causing website/email disruption.

  • Hijacking a domain via compromised registrar accounts.

7.2 Protective measures

  • Enable DNSSEC to validate digital signatures and prevent record forgery.

  • Use 2FA for domain/DNS admin accounts; enforce role-based access.

  • Choose DNS with Anycast, DDoS protection, and query rate limiting.

  • Lock the domain at the registrar (Registrar Lock); enable alerts for WHOIS/NS changes.

  • Monitor MX/TXT records to detect unauthorized edits.

7.3 A typical incident

An attack on a major DNS provider in 2016 disrupted many global services. The lesson: layer security and choose infrastructure with redundancy.

Takeaway: One hour of downtime can cost many orders; DNS security is inexpensive insurance with outsized impact.

8. Vietnam case study: optimize DNS to speed up the website and improve inboxing

Assume a home-appliance retailer in Hanoi runs a WordPress site and daily Ads. Before optimization:

  • Average DNS lookup: 180 ms (registrar DNS, no Anycast)

  • TTFB: 1.2 s; high mobile bounce rate

  • Email marketing: low inbox rate due to incomplete SPF/DKIM

Solution implemented in 1 week:

  • Move to Cloudflare DNS (Anycast) and enable DNSSEC

  • Lower TTL for A/CNAME to 300s during cutover; raise to 3600s afterward

  • Set up SPF/DKIM/DMARC correctly for the email domain

  • Offload static assets to a CDN; point img. and static. via CNAME

Results after 14 days:

  • DNS lookup down to 25-35 ms; TTFB down to 650-750 ms

  • Mobile bounce rate down by ~12%; time on page up by ~18%

  • Inbox rate improved; spam complaints dropped markedly

'DNS costs almost nothing compared to Ads, yet it clearly improved speed. We close more orders on mobile.' — Retail shop owner (Hanoi)

Takeaway: DNS optimization is a 'quick win' that cascades into SEO and CRO gains.

9. A standard DNS setup process for SMEs (step by step)

9.1 Preparation

  • Inventory services: web, email, CRM, landing pages, and active subdomains.

  • Choose a Managed DNS provider with Anycast and DNSSEC.

9.2 Configure core records

  • A/AAAA: Point the root (domain.com) to the server IP.

  • CNAME: Point www to root; SaaS subdomains (lp, app).

  • MX: As per your email provider's guide (Google/Microsoft).

  • TXT: SPF (authorize outbound mail servers), DKIM, DMARC.

  • NS: Use only the NS of the chosen DNS provider.

9.3 Optimize and test

  • Set reasonable TTLs (A/CNAME: 3600s; MX/TXT: 14400s).

  • Enable DNSSEC and verify the DS key.

  • Enable IPv6 if your infrastructure supports it.

  • Configure 301 redirects between www and non-www at the web server/CDN; avoid circular CNAMEs.

9.4 Safe rollout

  • Lower TTL to 300s before changes; raise it after stabilization.

  • Deploy during off-peak hours; have a rollback plan.

  • Monitor for 7-14 days: uptime, DNS lookup time, email deliverability.

Takeaway: A clear process helps avoid NXDOMAIN, wrong IP mappings, or lost email.

10. DNS diagnostic tools and quick fixes

10.1 Useful tools

  • dig, nslookup: query records from the terminal.

  • DNS checker (global vantage points): check propagation.

  • Traceroute/MTR: trace network paths and detect latency.

  • SPF/DKIM/DMARC testers: validate email configuration.

10.2 Common errors and how to fix them

  • NXDOMAIN: Domain does not exist -> Check spelling and records/zone.

  • SERVFAIL: Authoritative server error -> Check DNSSEC, SOA serial, and access.

  • Timeout: Query exceeded -> Check Anycast/POPs, DDoS protection, and firewall settings.

  • Mail lands in spam: Incorrect SPF/DKIM/DMARC -> Fix TXT records and wait for propagation.

10.3 Emergency checklist

  • Match records between the old and new DNS.

  • Verify NS at the registrar.

  • Test from another network/4G to rule out ISP caching.

Takeaway: Having a checklist and tools ready lets you resolve incidents in minutes.

11. Conclusion and recommendations (with an action checklist)

DNS underpins your website, SEO, and email. For SMEs, a few small changes like moving to Managed DNS, tuning TTL, enabling DNSSEC, and configuring SPF/DKIM/DMARC can make a big difference to speed, reliability, and conversions.

  • Choose DNS with Anycast and enable DNSSEC.

  • Standardize A/AAAA, CNAME, MX, TXT records.

  • Plan TTL for migrations.

  • Monitor DNS lookup time, uptime, and email deliverability.

If you need to align DNS with your SEO, performance, and marketing infrastructure strategy, contact HoangTrungDigital for end-to-end consulting and implementation. We help you build a solid technical foundation so every dollar of Ads budget delivers better results.

Found this article helpful?

Contact us for a free consultation about our services

Contact us

Bài viết liên quan