DNS & DevOps September 5, 2026 6 min read

A, AAAA, CNAME, and TXT Records Explained for Web Developers

A clear, practical guide demystifying essential DNS record types, how TTL works, and how to configure them properly without breaking your app.

Written by ByteLogic Team

DNS (Domain Name System) is often called the phonebook of the internet. For web developers, understanding how DNS records map human-readable domain names to servers and external services is a fundamental skill. Here is a developer-centric breakdown of the four most common records you will use on Devs.Surf.

1. A Record (Address Record)

The A Record maps a domain name directly to a 32-bit IPv4 address (e.g. 192.0.2.1). Use this when pointing your domain to a dedicated Virtual Private Server (VPS), cloud VM (EC2, Droplet, Hetzner), or static hosting IP.

Type: A
Name: @
Target: 51.79.147.204
TTL: 3600

2. AAAA Record (IPv6 Address)

Similar to the A record, the AAAA Record maps your hostname to a 128-bit IPv6 address (e.g. 2001:db8::1). Modern cloud providers recommend providing both A and AAAA records for dual-stack accessibility.

3. CNAME Record (Canonical Name)

The CNAME Record creates an alias from one domain name to another canonical domain name, rather than pointing to an IP address. This is the standard method used by cloud platforms like Vercel, Netlify, Render, and GitHub Pages.

Type: CNAME
Name: @
Target: cname.vercel-dns.com
TTL: 3600

When a browser queries your subdomain, the DNS resolver looks up the CNAME target and resolves its IP address dynamically. If the host shifts server IPs, your site keeps working without updating your DNS.

4. TXT Record (Text Record)

A TXT Record allows domain administrators to insert arbitrary text into DNS records. Primarily used for:

  • Domain Ownership Verification: Google Search Console, Vercel (_vercel), OpenAI (_openai-site-verification).
  • Email Authentication: SPF (Sender Policy Framework) and DKIM keys to prevent email spoofing.

Understanding TTL (Time To Live)

TTL is the number of seconds DNS resolvers (like Google 8.8.8.8 or Cloudflare 1.1.1.1) are permitted to cache your record before asking authoritative nameservers for updates:

  • Low TTL (60 - 300 seconds): Ideal when launching, testing, or migrating servers so changes take effect rapidly.
  • Standard TTL (3600 seconds / 1 hour): Best for stable production domains to minimize DNS lookups and maximize speed.

READY TO USE THIS DOMAIN?

Grab a free devs.surf subdomain and connect it to your preferred host in under 60 seconds.

SEARCH FREE DOMAINS

RELATED_GUIDES