HTTPfy

A record

The A (address) record maps a name to one IPv4 address. It is the record a browser needs before it can open a connection to an IPv4 server.

type code 1 RFC 1035

Live A records from real domains

Checked at via public DNS
google.comA
google.com. 9 IN A 173.194.73.100
google.com. 9 IN A 173.194.73.101
google.com. 9 IN A 173.194.73.102
google.com. 9 IN A 173.194.73.113
google.com. 9 IN A 173.194.73.138
google.com. 9 IN A 173.194.73.139
github.comA
github.com. 25 IN A 140.82.121.4
wikipedia.orgA
wikipedia.org. 98 IN A 185.15.59.224
cloudflare.comA
cloudflare.com. 149 IN A 104.16.132.229
cloudflare.com. 149 IN A 104.16.133.229

What the A record does

An A record holds exactly one 32-bit IPv4 address. A name can have several A records; together they form an RRset, and resolvers return all of them. Clients usually try them in the order received, and many authoritative servers rotate that order, which gives simple round-robin load spreading.

A records can sit at the zone apex (example.com) and on any subdomain, and can coexist with MX, TXT, CAA and other data at the same name. That is the main practical difference from CNAME.

Zone-file syntax

www.example.com.  3600  IN  A  192.0.2.10
; owner           TTL   class type address

Wire format: RDATA is 4 octets: the address in network byte order. RDLENGTH is always 4.

Fields

FieldMeaning
OwnerThe name being resolved. An unqualified name in a zone file is relative to $ORIGIN.
TTLSeconds a resolver may cache the answer. 300 to 3600 is typical; lower it a day before a planned IP change.
AddressDotted-quad IPv4 address. No port, no CIDR prefix, no hostname.

Common mistakes

  • Pointing the apex at a private address (10.x, 192.168.x) copied from an internal network. Public resolvers return it and nobody outside can connect.
  • Leaving an old A record next to a new one during a migration, so a share of visitors still reaches the retired server.
  • Setting a long TTL (86400) and then changing hosts: caches keep the old address for up to a day.
  • Creating an A record on a name that already has a CNAME. Most DNS panels refuse; zones that allow it behave unpredictably.

Specification

  • RFC 1035: Domain names - implementation and specification

Related record types

  • AAAA: map a hostname to an IPv6 address
  • CNAME: alias one name to another
  • HTTPS: ALPN, address hints and ECH for websites
  • PTR: reverse DNS from an IP address to a name

All DNS record types