What Is a DNS A Record? A Record Format, TTL & Examples

by

Last Updated:
8 min read
What Is a DNS A Record? A Record Format, TTL & Examples

Key Takeaways

  • A DNS A record maps a domain name or hostname to an IPv4 address, helping browsers and other services locate the correct server.
  • A record TTL determines how long DNS responses stay cached. Lowering it before server migrations can help minimize downtime.
  • Multiple A records can distribute traffic across several IP addresses, but DNS round-robin does not provide automatic failover.
  • A records, AAAA records, CNAME records, and MX records serve different purposes in DNS routing, from IPv4 and IPv6 mapping to aliases and email delivery.
  • Regularly checking A records helps identify configuration errors, outdated IP addresses, and dangling records that could expose your domain to hijacking.

An A record is the fundamental building block of the DNS system, containing three core elements: the hostname, a Time to Live (TTL) value, and exactly one 32-bit IPv4 address. The letter “A” stands for “address.” Without an A record, web browsers and mail transfer agents cannot locate the web server hosting your content. 

Check any domain’s active host mapping instantly with our free A record lookup tool.

What Is a DNS A Record?

A DNS A record (address record) maps a domain name or hostname to an IPv4 address, for example, example.com to 192.0.2.1. The primary purpose of an A record is to resolve a human-readable hostname to a routable IPv4 address. An A record contains an IPv4 address, while modern 128-bit IPv6 networks use a separate AAAA record.

Because almost every public web asset requires a direct routing path, the A record remains the most common of all DNS record types.

DNS A Record Format and Examples

In standard RFC zone files, an A record follows a strict space-delimited text format:

example.com.    3600    IN    A    192.0.2.1

Each component performs a specific function:

  • Name (example.com.): The fully qualified domain name (FQDN) being mapped, ending with a trailing dot representing the DNS root.
  • TTL (3600): The Time to Live in seconds, specifying how long intermediate resolvers can cache this response before requesting a fresh copy.
  • Class (IN): The internet class, which is standard for web and mail traffic.
  • Type (A): The record type indicator specifying an IPv4 address mapping.
  • Data / Target (192.0.2.1): The destination IPv4 address where the host runs.

In modern DNS management dashboards (such as Cloudflare, AWS Route 53, or Namecheap), records are entered into tabular forms without manual zone-file syntax. The table below illustrates how standard records appear:

HostTypeValueTTLDescription
@A192.0.2.13600Apex/root domain (example.com) pointing to the primary web server
wwwA192.0.2.13600Common web prefix pointing to the same server address
blogA198.51.100.73600Independent sub-service hosted on dedicated infrastructure
mailA203.0.113.253600Direct destination host referenced by your MX record
@A192.0.2.883600Standalone example domain (example.net) web endpoint

The @ symbol acts as a shorthand macro for your root or apex domain. Most provider dashboards append your primary domain name automatically, meaning entering blog creates a record for blog.example.com.

How a DNS A Record Works

When you enter a web address into your browser, resolving the destination involves five straightforward operations:

  1. User request: You enter example.com into your browser address bar.
  2. Local cache check: Your operating system and local recursive resolver check their memory to see if a valid, unexpired copy of the record already exists.
  3. Upstream query: If no cached entry exists, the recursive resolver queries the authoritative nameservers managing the zone file for example.com.
  4. Record retrieval: The authoritative nameserver reads its zone file and returns the A record containing 192.0.2.1.
  5. Connection establishment: The resolver hands 192.0.2.1 back to your browser, which initiates an HTTP or TLS connection directly to that IP address.

To explore the entire hierarchical path through root and TLD nameservers, review our foundational guide on how DNS works.

What Is TTL in an A Record?

Time to Live (TTL) dictates the lifespan of a DNS response inside resolver and browser caches, expressed as several seconds. Popular baseline TTL settings are 3600 seconds (one hour) for stable production assets and 300 seconds (five minutes) for dynamic environments. Higher TTL values improve page load latency and decrease query loads on your authoritative servers.

Before conducting server migrations or IP updates, lower your A record TTL to 300 seconds at least 24 hours in advance. Once the migration concludes and traffic routes cleanly to the new destination, raise the TTL back to 3600 or 86400 seconds. This step minimizes downtime caused by lingering cached addresses during DNS propagation.

Can a Domain Have Multiple A Records?

Yes, a domain or subdomain can have multiple A records published simultaneously.

Publishing several A records with identical hostnames pointing to distinct IP addresses enables DNS round-robin load distribution:

www.example.com. 300 IN A 192.0.2.10
www.example.com. 300 IN A 192.0.2.20

When recursive resolvers request www.example.com, the authoritative server returns both IP addresses, alternating their order with each query. This mechanism distributes traffic across multiple web servers without a centralized hardware load balancer.

However, DNS round-robin does not provide automatic failover. A standard DNS server cannot detect whether a web service on 192.0.2.10 has crashed; it will continue handing out the dead IP address to client browsers until the record is manually removed.

Note that while a single A record entry holds only one IPv4 address, multiple unique hostnames across different organizations can share the same underlying IP address via name-based virtual hosting.

Why Do You Need an A Record?

A records form the operational anchor of domain management for several everyday purposes:

  • Primary website hosting: Connects your registered domain name to your primary web host or content delivery network.
  • Subdomain infrastructure: Powers dedicated applications, member portals, and developer environments like api.example.com or app.example.com.
  • Mail server endpoints: Resolves the hostname specified in your MX record, allowing remote servers to deliver incoming emails to your mail gateway.
  • Network services: Maps FTP hosts, VPN endpoints, and remote database clusters to reachable addresses.

A Record vs. AAAA, CNAME and MX Records

DNS uses distinct record types to serve different routing purposes:

Record TypeTarget ValueExampleBest Use Case
A32-bit IPv4 address192.0.2.1Pointing a hostname directly to an IPv4 server
AAAA128-bit IPv6 address2001:db8::1Pointing a hostname directly to a modern IPv6 server
CNAMECanonical hostnamehost.cdn-provider.comAliasing one domain name to another existing hostname
MXMail server hostname and priority10 mail.example.comDirecting inbound domain email to designated mail handlers

A Record vs. AAAA Record

An A record resolves hostnames to 32-bit IPv4 addresses, while an AAAA record resolves hostnames to 128-bit IPv6 addresses. As IPv4 address exhaustion continues globally, most modern organizations publish dual-stack configurations by adding matching A and AAAA records to their zones.

A Record vs. CNAME Record

An A record points a hostname directly to an IP address, while a CNAME record creates an alias that points one domain name to another domain name. Per RFC specifications, CNAME records cannot exist at the root apex domain (@) alongside other records like MX or TXT. 

Review our detailed side-by-side technical evaluation in CNAME vs A record.

A Record vs. MX Record

An MX record does not map a domain to an IP address; it designates the specific mail server hostname responsible for receiving mail. That designated mail host must then possess its own working A record so remote mail systems know where to establish an SMTP connection.

Review our guide on which DNS record identifies an email server to examine this relationship.

How to Create a DNS A Record

Setting up an A record requires access to your domain’s active DNS provider:

  1. Log in to your DNS hosting provider or domain registrar management portal.
  2. Navigate to your domain’s DNS Management, Zone File, or DNS Records settings.
  3. Select Add Record and set the record type dropdown to A.
  4. In the Name or Host field, enter @ to represent your root apex domain, or type a subdomain prefix (such as www or portal).
  5. Enter your server’s public IPv4 address into the Points to, Value, or Target field.
  6. Set the TTL (choose 3600 for general web hosting, or 300 if you plan to update the server soon).
  7. Save the record.

If you manage DNS through Cloudflare, choose whether the record should be Proxied (routing web traffic through Cloudflare’s security layer and CDN) or set to DNS only (bypassing the proxy to return your origin server IP directly). After saving, verify changes with a global DNS propagation checker.

See When Your A Records Change

PowerDMARC runs 46 security checks on every domain you own, every day. A DNS event feed logs record and nameserver changes with before and after values; dangling CNAMEs get flagged, and you get an objective 0 to 100 security score.

How to Check a DNS A Record

Confirming that your A records resolve properly across the internet is straightforward using web tools or native system command prompts.

Online Lookup

The easiest way to inspect public records across external nameservers is through our browser-based A record lookup tool. To review all associated MX, TXT, and CNAME records simultaneously alongside your A records, use our comprehensive DNS record lookup.

Command Line Tools

You can query authoritative and recursive servers directly from your terminal using native utilities:

  • macOS / Linux (dig):

dig A example.com +short

Returns the destination IPv4 address. Run dig A example.com to inspect the full response header, status flags, and remaining TTL.

  • Windows (nslookup):

nslookup -type=A example.com

Displays the local resolver answering the request followed by the target IPv4 address.

  • PowerShell (Resolve-DnsName):

Resolve-DnsName -Name example.com -Type A

Outputs a formatted table showing the hostname, record type, TTL, and assigned IP address.

Common A Record Issues and Fixes

Configuration errors in your A records can take websites offline or introduce vulnerabilities:

  • Stale cache and prolonged TTL: Migrating a site without previously lowering your TTL causes visitors to pull obsolete IP addresses from local cache until the previous countdown expires.
  • Conflicting A and CNAME records: RFC 1912 forbids placing a CNAME record on a hostname that also holds an A record. If you require an alias, remove the existing A record first.
  • Missing www configuration: If you publish an A record only for @, visitors navigating to www.example.com will encounter connection errors unless you create a corresponding A or CNAME entry for www.
  • Outdated AAAA records: If you migrate your IPv4 host but leave an older IPv6 AAAA record in place, visitors with IPv6-enabled connections will continue attempting to load the defunct server.
  • Dangling A records and subdomain takeover: If you release a cloud virtual machine or elastic IP address on AWS or Azure without removing the corresponding A record in your DNS, another cloud customer can provision that same released IP and hijack your traffic. Regularly audit your infrastructure to clean up dangling DNS records.

Frequently Asked Questions

What does the “A” in A record stand for?

The “A” in an A record stands for “Address.” It represents the core host address mapping mechanism that connects alphabetical domain names to numerical IPv4 addresses on the internet.

What happens if I delete my DNS A record?

The deletion of your A record will prevent your domain from finding its IP address, which results in website downtime until you restore or replace the record.

How long does it take for a DNS A record change to propagate?

The time required for DNS changes to spread across the entire world network spans from several minutes to 48 hours. The exact time depends on your TTL settings and how frequently different DNS servers refresh their cached data.

Can an A record point to another domain?

No. An A record can only accept a valid 32-bit IPv4 address. If you need to map one domain name or subdomain to another domain name, use a CNAME record instead.

Do I need an A record for email?

Yes, indirectly. While an MX record designates which mail server handles incoming mail for your domain, that MX record points to a hostname rather than an IP address. The designated mail hostname must have a valid A record so external mail servers can route traffic to it.

Final Words

The DNS A record is the fundamental connector between human-readable domain names and the physical IPv4 infrastructure powering the web. Maintaining precise record values, using lower TTL settings before scheduled migrations, and removing obsolete host mappings ensure continuous uptime, predictable routing, and optimal web performance.

DNS configurations also play a central role in organizational security. Regularly evaluate your domain landscape, audit for abandoned endpoints, and protect your digital assets against hijacking and spoofing with PowerDMARC.

DNS A record