Skip to content
Webmaster Tools

A record

An A record maps a domain name to an IPv4 address. How the fields and TTL work, A records for GitHub Pages and Cloudflare, how to look them up, and the usual mistakes.

What it is

An A record (address record) maps a name to an IPv4 address. When a browser opens example.com, its resolver asks for the A record and connects to the address it gets back. It is the oldest and most common record type, defined in RFC 1035; its IPv6 counterpart is the AAAA record.

example.com.      3600  IN  A  203.0.113.10
www.example.com.  3600  IN  A  203.0.113.10

A name can have several A records. Resolvers return all of them, usually in varying order, and clients pick one: a cheap form of load spreading, but with no health checks, so a dead address keeps getting traffic.

The fields

Field Example Meaning
Name example.com. The host the record is for; @ in most DNS panels means the zone apex
TTL 3600 How many seconds resolvers may cache the answer
Class IN Internet; practically always IN
Type A Address record
Data 203.0.113.10 One IPv4 address (32 bits, dotted decimal)

The data is always a literal IP address, never a hostname. To point a name at another name, use a CNAME record instead.

Common setups

  • Apex of a site: @ A 203.0.113.10 points the bare domain at your server or load balancer, with www as a CNAME or a second A record.
  • GitHub Pages: an apex domain gets four A records, 185.199.108.153, 185.199.109.153, 185.199.110.153 and 185.199.111.153.
  • Cloudflare proxy: with the orange cloud on, public lookups return Cloudflare's anycast addresses, not the origin IP you entered. That's expected; the origin is only visible in the dashboard.
  • Hosting platforms such as Vercel or Netlify document a fixed apex address or recommend an ALIAS / CNAME-flattened record; follow the address their dashboard shows for your project, since it can change.

How to check it

Use our DNS Lookup to see the A records and their TTL, or compare several public resolvers with the DNS Propagation Checker. From a terminal:

dig example.com A +short
dig @1.1.1.1 example.com A
nslookup -type=A example.com

Querying a specific resolver (@1.1.1.1, @8.8.8.8) shows what the rest of the world sees, not what your laptop has cached. To find who operates an address, look it up in the IP Lookup.

Common mistakes

  • Waiting for "propagation" after a change. There is no push: resolvers keep the old answer until its TTL expires. Lower the TTL (to 300, say) a day before a migration, then raise it again afterwards.
  • Forgetting www. The apex and www are separate names; each needs its own A record or a CNAME.
  • A stale record next to a new one. Adding the new server's address without deleting the old one makes clients alternate between them.
  • A record and CNAME on the same name. A name with a CNAME can't have any other record, so most providers refuse the combination.
  • Exposing the origin. An unproxied A record on a subdomain (direct.example.com) can reveal the IP behind your CDN.