A and AAAA Records: Pointing Your Domain to an IP Address
When you type a domain like example.com into your browser, your computer has to figure out where to go. Under the hood, it needs an IP address, not a name. That translation from name to number is done with DNS records, and the two main ones for websites are A and AAAA records.
You can think of A and AAAA records as entries in a digital address book. The domain is the contact name, and the IP address is the phone number. Without these records, your domain would look nice on a business card but lead nowhere.
What Is an A Record?
An A record (Address record) is a DNS record that points a domain or subdomain to an IPv4 address. IPv4 is the older, widely used version of internet addressing, with numbers like 192.0.2.1.
IPv4 addresses look like this:
192.0.2.193.184.216.34203.0.113.57
Each A record connects a name to an IPv4 address. For example:
example.com. A 93.184.216.34
This line simply says: “If someone asks for example.com, send them to the server at 93.184.216.34.”
What Is an AAAA Record?
An AAAA record (often said “quad A”) does the same kind of job but for IPv6 addresses. IPv6 is the newer standard designed to solve the problem of running out of IPv4 addresses.
IPv6 addresses are much longer and use hexadecimal (0–9 and a–f):
2001:db8:85a3::8a2e:370:73342a03:2880:f10d:83:face:b00c::25de
An example AAAA record:
example.com. AAAA 2001:db8:85a3::8a2e:370:7334
This says: “If someone uses IPv6 and asks for example.com, send them to this IPv6 address.”
Why Do We Have Both A and AAAA Records?
Right now, the internet is in a long transition period between IPv4 and IPv6. A lot of networks still mainly use IPv4, but more and more providers support IPv6 as well.
Because of this, many domains use both record types:
example.com. A 93.184.216.34
example.com. AAAA 2001:db8:85a3::8a2e:370:7334
When a visitor tries to reach your domain:
- If their network and device support IPv6, they may use the AAAA record.
- If not, they fall back to the A record and use IPv4.
This dual setup lets your site work smoothly in older and newer environments without users noticing anything special.
How A and AAAA Records Work Step by Step
To see what actually happens when someone visits your site, let’s walk through the process in slow motion.
- The user types
mybusiness.cominto their browser. - The browser asks a DNS resolver (usually provided by their ISP or a public DNS service) for the IP address of
mybusiness.com. - The resolver finds your domain’s nameservers and asks them:
- “Do you have an AAAA record for
mybusiness.com?” - “Do you have an A record for
mybusiness.com?”
- “Do you have an AAAA record for
- Your nameservers reply with the available IP addresses.
- The resolver picks the best option (IPv6 if possible, otherwise IPv4) and gives it to the browser.
- The browser connects directly to that IP address and loads your website.
All this usually takes less than a second. For the user, it looks like one simple action: type domain, see website.
Basic Syntax of A and AAAA Records
Although control panels hide some of the raw syntax, it is helpful to know what is going on behind the form fields.
A typical DNS zone might contain entries like:
@ A 198.51.100.10
www A 198.51.100.10
api A 198.51.100.20
@ AAAA 2001:db8:1234::10
www AAAA 2001:db8:1234::10
api AAAA 2001:db8:1234::20
Here:
@stands for the root domain (for example,mybusiness.com).wwwstands forwww.mybusiness.com.apistands forapi.mybusiness.com.
The A records serve IPv4 visitors; the AAAA records serve IPv6 visitors.
When Do You Need A Records?
You need an A record whenever you want to point a domain or subdomain to a specific IPv4 address. Common situations:
- Pointing your main domain to your web server – the most typical use.
- Pointing subdomains to different servers – for example,
blog.example.comon a separate machine. - Pointing to a CDN or load balancer – some services give you an IPv4 address to use.
- On-premise or legacy environments – where IPv6 is not supported or not yet used.
Even if you support IPv6, almost everyone still needs A records because many networks and devices rely on IPv4.
When Do You Need AAAA Records?
AAAA records come into play when your hosting or infrastructure supports IPv6. Reasons to add them:
- Modern hosting – many providers now give you both IPv4 and IPv6 addresses.
- Better connectivity in some regions – certain networks prefer IPv6 internally.
- Future-proofing – you avoid being stuck when IPv4 becomes more limited or expensive.
You do not usually drop A records when you add AAAA. Instead, you run both, so visitors can use whatever their network supports.
Setting Up A and AAAA Records in a Control Panel
Most DNS control panels have a similar pattern when you add or edit these records. The field names may vary slightly, but the idea is the same.
Example: Adding an A Record
- Log into your DNS provider or registrar.
- Open the DNS management or “Zone Editor” for your domain.
- Click “Add record” and choose type A.
- Fill in:
- Name / Host:
@(for the root) or a subdomain likewww. - Value / IP: the IPv4 address of your server (for example,
198.51.100.10). - TTL: how long other servers should cache this record (for example, 3600 seconds).
- Name / Host:
- Save the record.
Example: Adding an AAAA Record
- In the same zone editor, click “Add record” and choose type AAAA.
- Fill in:
- Name / Host: usually the same name as your A record if you want both IPv4 and IPv6 for that host.
- Value / IP: the IPv6 address from your hosting provider.
- TTL: similar to the A record, for example, 3600 seconds.
- Save the record.
After you save, it can take some time for changes to propagate, depending on your TTL and caching.
Multiple A Records for One Domain
You can have more than one A record for the same name. This is sometimes used for basic load balancing or redundancy.
example.com. A 198.51.100.10
example.com. A 198.51.100.11
example.com. A 198.51.100.12
When a DNS resolver asks for example.com, it may get all three IPs and pick one, often rotating between them. This spreads traffic across several servers.
The same idea can apply to AAAA records with multiple IPv6 addresses.
TTL: How Long A and AAAA Records Are Cached
Each A or AAAA record has a TTL (Time To Live). This value (in seconds) tells other DNS servers how long they can cache the answer before asking again.
Common TTL values:
- 300 (5 minutes) – useful during migrations or testing.
- 3600 (1 hour) – a typical default.
- 86400 (24 hours) – stable records that rarely change.
A lower TTL makes changes appear faster but increases DNS traffic. A higher TTL reduces traffic but means any mistake or change will take longer to fully update.
Simple Real-World Scenario
Imagine you are setting up a new site for a small online course platform called learnfast.com.
- You register
learnfast.comat a registrar. - Your hosting provider gives you:
- IPv4:
198.51.100.50 - IPv6:
2001:db8:1234::50
- IPv4:
- In your DNS zone, you create:
@ A 198.51.100.50 @ AAAA 2001:db8:1234::50 www CNAME learnfast.com. - Now:
learnfast.comworks over both IPv4 and IPv6.www.learnfast.comfollows whatever records you set for the root domain.
If you later move to a new server, you just update the A and AAAA records to the new IPs. The domain name stays the same; only the “phone numbers” behind it change.
Common Mistakes with A and AAAA Records
A few simple errors show up again and again when people work with these records for the first time:
- Pointing to the wrong IP – a single digit off means the browser goes to the wrong server or nowhere at all.
- Forgetting the root or www – sometimes only
www.example.comworks whileexample.comfails, or the other way around. - Missing AAAA records – your host supports IPv6, but you never added AAAA records, so IPv6 users cannot benefit.
- Very high TTL during a migration – changes take much longer to propagate if TTL is set to 24 hours or more.
When troubleshooting, it often helps to test your domain with a DNS lookup tool to see exactly which A and AAAA records are being returned.
FAQ
Do I need both A and AAAA records?
You must have A records for IPv4 visitors. AAAA records are needed only if you want to support IPv6. If your hosting provider gives you an IPv6 address, it is usually a good idea to add AAAA records so your site works well in both worlds.
What happens if I only create AAAA records?
If you only create AAAA records and no A records, visitors who are on networks without IPv6 support may not be able to reach your site. That is why most sites keep A records even after enabling IPv6.
Can I point A and AAAA records to different servers?
Technically yes, but it can create confusing behavior. Users on IPv6 might see a different site or version than IPv4 users. In most cases, you want both record types to point to servers that deliver the same content or service.
How can I check my current A and AAAA records?
You can use free online DNS lookup tools or command-line tools like dig or nslookup. Look up your domain with type A and AAAA to see which IP addresses are being returned from your nameservers.
Does adding AAAA records improve performance?
It can help in some cases, especially where IPv6 networks are well optimized, but it is not a magic speed button. The main benefits are future-proofing and compatibility with modern networks. Overall performance still depends on your hosting, code, and infrastructure.
A and AAAA records are small pieces of text, but they play a central role in how visitors reach your site. Once you understand that they simply map your domain to IPv4 and IPv6 addresses, configuring and troubleshooting them becomes much less intimidating.