What is an A record and how do you set it up?
Published on June 19, 2026 6 min read
An A record links your domain to your server's IPv4 address. Learn what an A record is, how it works and how to set one up and check it.
An A record links a domain name or subdomain to the IPv4 address of the server where your website or service runs. It is the most widely used DNS record on the internet: without a correct A record, a browser has no way to know which IP address belongs to your domain, and your site stays unreachable. This article explains what an A record is, how it works, and how to set one up and check it yourself.
What is an A record?
The "A" stands for address. An A record is a DNS record that translates a hostname, such as yourdomain.com or www.yourdomain.com, into an IPv4 address. An IPv4 address is made up of four numbers from 0 to 255, separated by dots, for example 192.0.2.10.
The A record is the oldest and best known record type. It was defined in RFC 1035 back in 1987 and has type number 1 in DNS. Computers do not work with names but with IP addresses, so the A record forms the bridge between the name people remember and the address machines use.
How does an A record work?
When someone types yourdomain.com, the browser asks a DNS resolver which IP address belongs to that name. The resolver looks up the A record at the domain's nameservers and gets the IPv4 address back. The browser then connects to that server and loads the website.
In most DNS editors you fill in three things per record: a name (also called host), a type (A), and a value (the IPv4 address). The @ symbol stands for the domain itself, known as the root or apex. A subdomain is entered with its label, such as www, shop, or mail. That way each domain and subdomain can point to its own server.
| Name | Type | Value (IPv4) |
|---|---|---|
| @ | A | 192.0.2.10 |
| www | A | 192.0.2.10 |
| shop | A | 192.0.2.20 |
A record versus AAAA record and CNAME
The A record is often confused with two other records. The difference is in what they point to.
| Record | Points to | Use |
|---|---|---|
| A | An IPv4 address (32-bit) | Point a domain or subdomain to a server |
| AAAA | An IPv6 address (128-bit) | The same as an A record, but for IPv6 |
| CNAME | Another hostname | Point a name as an alias to another name |
An AAAA record (pronounced "quad-A") does the same job as an A record, but for the newer IPv6 standard. Many servers have both: an A record for IPv4 and an AAAA record for IPv6. This is called dual stack.
A CNAME record does not point to an IP address but to another name. One important rule: you cannot place a CNAME on the root domain (the apex, such as yourdomain.com without www). There you always use an A record or AAAA record. The reason is that the apex holds mandatory SOA and NS records, and a CNAME is not allowed to sit alongside other records on the same name.
How to set up an A record
Where you set an A record depends on who manages your DNS: it may be the DNS management area of your hosting provider or the control panel for your domain. The steps are almost the same everywhere.
- Log in to your DNS provider or domain registrar and open the DNS or zone settings for your domain.
- Find the correct IPv4 address. This is the address of your server or hosting package. You will find it in your hosting control panel, or you can request it from your provider.
- Create a new record of type A.
- In the name or host field, enter the @ symbol for the root domain, or a label such as www for a subdomain.
- Put the IPv4 address in the value or address field.
- Choose a TTL. A common value is 3600 seconds (one hour).
- Save the record and wait until the change takes effect.
Multiple A records, subdomains, and wildcards
You can place more than one A record on the same name, each with a different IPv4 address. The DNS server then returns the addresses in a rotating order. This is called round-robin and spreads visitors roughly across several servers.
For subdomains you create separate A records, such as www, shop, or api, each with its own address. If you want every subdomain that you have not set up individually to point to the same address, you use a wildcard: an A record with the name *.
How to check an A record
After setting it up, you will want to confirm that the A record is correct. You can do this with a built-in command on your computer.
- Windows: in the command prompt, type
nslookup yourdomain.com. For the A record only, usenslookup -type=A yourdomain.com. - macOS and Linux: use
dig A yourdomain.com +short. This returns just the IPv4 addresses.
If the IP address shown matches your server, the A record is set correctly. If you still see the old address, the change has probably not been applied everywhere yet.
Troubleshooting common problems
| Symptom | Possible cause | Solution |
|---|---|---|
| Site still unreachable after a change | The TTL or cache has not expired yet | Wait until the TTL expires, which can take up to 48 hours, then clear your DNS cache if needed |
| Error when adding a CNAME on the root domain | A CNAME is not allowed on the apex | Use an A record or AAAA record on the root domain |
| Wrong website or error page | The A record points to the wrong IP address | Check the IPv4 address and correct it if needed |
| Change does not seem to take effect | You are seeing a cached version | Test with dig or nslookup and wait until the cache refreshes |
With a correctly configured A record, your domain points to the right server and your website is reachable. If you get stuck or are not sure which IP address to use, contact support and we will be glad to help.
Frequently asked questions
What is the difference between an A record and a CNAME record?
An A record points a name directly to an IPv4 address. A CNAME record points a name to another name, as an alias. On the root domain you always use an A record, because a CNAME is not allowed there.
Can I use multiple A records for the same domain?
Yes. You can place several A records with different IPv4 addresses on the same name. The DNS server returns the addresses in a rotating order, which is called round-robin, and this spreads traffic roughly across several servers.
What is the difference between an A record and an AAAA record?
An A record points to an IPv4 address and an AAAA record points to an IPv6 address. They do the same job for different kinds of IP address. Many domains have one of each.
How long does it take for an A record to become active?
A change is usually visible within a few minutes to a few hours, depending on the TTL. For larger changes, such as moving a domain to a new server, it can take up to 48 hours.
Which IPv4 address should I put in my A record?
The IPv4 address of the server or hosting package where your website runs. You will find this address in your hosting control panel, or you can ask your hosting provider.
How do I check my A record?
On Windows use nslookup yourdomain.com, and on macOS or Linux use dig A yourdomain.com +short. The IPv4 address shown should match the address of your server.