keepcalculator

06 Numbers and Powers

URL to IP: What A and AAAA Records Tell You

Card No. 06·66325 · Updated · Standard formula, shown below

When you type a URL like example.com into your browser, the domain name system (DNS) translates it into an IP address. The two record types that hold that translation are A records (for IPv4 addresses) and AAAA records (for IPv6 addresses). These records tell you the exact numeric address a domain points to, and they determine whether your device can reach the site at all.

Background: Why URLs Need IP Addresses

Computers on the internet do not use names like example.com; they use numeric IP addresses. A URL is a human-friendly label that must be resolved to a routable address before any data can be sent. This resolution happens through DNS, a distributed database that maps domain names to IP addresses.

There are two IP versions in use today:

  • IPv4 — 32-bit addresses, written as four decimal numbers separated by dots, e.g. 192.0.2.1. The pool contains about 4.3 billion addresses, which is nearly exhausted.
  • IPv6 — 128-bit addresses, written as eight groups of hex digits separated by colons, e.g. 2001:db8::1. It provides a vastly larger space and is the long-term replacement for IPv4.

When you look up a domain, your DNS resolver asks for both A and AAAA records. The browser then chooses which to use, usually preferring IPv6 if it is available and the network supports it.

How A and AAAA Records Work

An A record maps a hostname to an IPv4 address. A AAAA record (pronounced “quad-A”) maps the same hostname to an IPv6 address. Both are stored on authoritative DNS servers and are queried by resolvers on behalf of clients.

For example, a domain might have:

  • example.com → A record 93.184.216.34
  • example.com → AAAA record 2606:2800:220:1:248:1893:25c8:1946

When you run a DNS lookup tool (like nslookup or dig) on a domain, you are querying these records. The response shows the IP address(es) the domain currently resolves to. This is the same information your browser uses to connect.

Each record also has a TTL (time to live) value, measured in seconds, which tells resolvers how long to cache the answer. A shorter TTL means changes propagate faster but increases DNS query load.

What an A Record Tells You

An A record tells you the IPv4 address of a server. This is the most common record type and is used by virtually every website that supports older networks. When you see an A record, you know:

  • The domain is reachable over IPv4.
  • The address is a 32-bit number, usually owned by a hosting provider or CDN.
  • If the record is missing, IPv4-only clients will fail to connect.

In practice, many large sites use multiple A records for load balancing. A DNS query may return several IPs, and the browser picks one. This is also how round-robin DNS distributes traffic.

What an AAAA Record Tells You

An AAAA record tells you the IPv6 address of a server. Its presence indicates that the domain supports modern IPv6 networks. Key points:

  • It is a 128-bit address, providing far more possible addresses than IPv4.
  • If a domain has only an AAAA record and you are on an IPv4-only network, you cannot reach it.
  • If a domain has both A and AAAA, the system will usually try IPv6 first, then fall back to IPv4 if needed.

Many hosting providers now include AAAA records by default, but not all do. Checking for an AAAA record is a quick way to see if a site is IPv6-ready.

How to Look Up A and AAAA Records

You can query these records using built-in tools on most operating systems:

  1. On Windows: open Command Prompt and type nslookup -type=A example.com or nslookup -type=AAAA example.com.
  2. On macOS/Linux: open Terminal and type dig A example.com or dig AAAA example.com.
  3. Online DNS lookup tools: many websites offer a simple form where you enter a domain and choose record type.

You can also use ping or tracert to see which address your computer actually uses, but those commands may not show the full DNS response.

Common Problems and Misconceptions

One common misconception is that a domain must have either an A or an AAAA record, but not both. In reality, most domains have both to support all users. Another misconception is that the IP address you see in a DNS lookup is the same as the server’s physical location. That is rarely true — many sites use content delivery networks (CDNs) that serve from multiple locations.

Common problems include:

  • Missing AAAA record: IPv6-only users cannot access the site.
  • Incorrect TTL: A very long TTL can delay propagation when you change IPs.
  • Multiple records with different IPs: This is normal for load balancing, but can confuse beginners.
  • DNS caching: Your local resolver may show an old IP even after the record changes.

Choosing Between A and AAAA for Your Own Domain

If you manage a domain, you should generally have both records. Here is how to decide:

  • If your hosting provider gives you an IPv4 address, add an A record.
  • If they give you an IPv6 address, add an AAAA record.
  • If you are unsure, ask your provider — many offer both by default.
  • For a small website, one A record and one AAAA record is sufficient.
  • For a high-traffic site, you may have multiple A and AAAA records for redundancy.

Never point an A record to an IPv6 address or vice versa — the record type must match the address version.

Frequently Asked Questions

Can a domain have both A and AAAA records?

Yes, most domains have both. This is called dual-stack and allows the site to be reached over both IPv4 and IPv6. A browser will typically try IPv6 first and fall back to IPv4 if the connection fails.

Why does my DNS lookup show multiple IPs?

Multiple A or AAAA records are often used for load balancing. The DNS server returns several addresses, and the client picks one. This distributes traffic across multiple servers and improves reliability.

What happens if a domain has no A or AAAA record?

If a domain has no A record, IPv4 clients cannot connect. If it has no AAAA record, IPv6 clients cannot connect. If it has neither, the domain will not resolve at all, and the browser will show a “server not found” error.

How long does it take for a DNS change to take effect?

It depends on the TTL set on the record. If the TTL is 3600 seconds (1 hour), all resolvers will update within an hour. If it is 300 seconds, updates happen within 5 minutes. You can lower the TTL before a change to speed up propagation.

Is the IP address in an A record the same as the server’s physical location?

Not necessarily. Many websites use CDNs, which have servers in multiple locations. The IP you see may be a CDN edge node, not the origin server. Also, IP geolocation databases are approximate and can be inaccurate.

Can I use an AAAA record for a website that only has an IPv4 server?

No. An AAAA record must contain a valid IPv6 address. If your server does not have an IPv6 address, you cannot create a working AAAA record. You would need to use a translation service or get IPv6 support from your host.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →