Domains, CDN & Web Delivery

A Record

Definition

The A stands for address, and the value is a single IPv4 address in dotted form, such as 203.0.113.42 — never a hostname. Its counterpart for IPv6 is the AAAA record, which behaves identically with a longer address. A host may hold several A records at once, in which case resolvers hand them out in rotation and the load is spread roughly evenly between them. Unlike a CNAME, an A record is legal anywhere in the zone, including at the apex domain, and it can sit happily alongside MX, TXT and other types on the same name. The trade-off is that it hardcodes a number: whenever the machine behind that address changes, someone has to edit the zone.

Why It Matters

Pointing an A record at a host means tying your name to an address you do not control. Large hosts publish anycast addresses precisely for this reason and commit to keeping them, which makes the arrangement safe; an address you discovered yourself by resolving a hostname carries no such promise and will eventually be recycled. When that happens the failure is total and silent — the name resolves, the connection succeeds, and a stranger's server answers with a certificate error or someone else's page. Because there is no deploy and no code change to point at, this is one of the slower outages to diagnose.

How It Works

You create the record with the host you want to answer for, the type set to A, the address in the value field and a TTL in seconds. A resolver that asks for the name receives the address and the remaining lifetime of its cached copy, then the browser opens a TCP connection to it. The original hostname travels in the TLS handshake as Server Name Indication and again in the HTTP Host header, so a server hosting thousands of names knows which site is wanted — the A record only got the packets to the door. This is also why two names sharing an address is normal rather than a conflict.

Real-World Example

A studio wants hart.co.uk itself, not just a subdomain, to serve a portfolio published on 99helpers. Their DNS provider offers no ALIAS support, so they use the fixed address the platform documents and set an A record at the apex with a TTL of 3600. The portfolio answers at the bare name within the hour. They also note the address in their runbook, because an A record is the one piece of the setup that has to be revisited if the platform ever republishes its address list.

Common Mistakes

  • Entering a hostname in the value field — an A record accepts an address only, and a provider that validates will simply refuse to save
  • Copying an address you resolved from the host's target hostname — those rotate, and the day they rotate your site belongs to somebody else
  • Keeping the old and new A records side by side during a migration — visitors are dealt one of the two at random until you delete the old one

Related Terms

Put a file online in seconds

Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.

Host a file free →