An A record is the DNS record that points a domain name or subdomain to a specific IPv4 address. It's the record type doing the actual work behind the scenes any time a visitor types your website address and their browser finds the right server to connect to.
How an A Record Works
Computers communicate using IP addresses, not domain names. When someone visits your website, their device looks up your domain in DNS to find the IPv4 address of the server hosting it. The A record is what provides that answer.
An A record has three main parts:
- Host: the domain or subdomain the record applies to, for example @ for the root domain, or shop for shop.yourdomain.com.
- Points To (Value): the IPv4 address of the server, such as 102.223.xx.xx.
- TTL (Time to Live): how long, in seconds, other DNS servers should remember this answer before checking again.
When You'd Need to Add or Change an A Record
You don't normally need to touch A records when your domain's nameservers already point to your host, since the DNS zone is set up correctly from the start. You're more likely to need one when:
- You're pointing a subdomain to a different server than the rest of your website, such as an app or a staging site hosted elsewhere.
- Your domain uses nameservers from a provider other than your host, so you need to add the A record yourself to connect your domain to your hosting server's IP address.
- You're troubleshooting why a domain or subdomain isn't resolving to the right server.
Changing an A record doesn't move your website or email anywhere. It only changes where visitors are sent. Always confirm the server's correct IPv4 address before editing the record, since a mistyped address will take your site offline.
A Record vs Other DNS Record Types
It's easy to confuse an A record with similar-looking records:
- A CNAME record points a subdomain to another domain name rather than directly to an IP address.
- An AAAA record does the same job as an A record, but for IPv6 addresses instead of IPv4.
How to Add or Edit an A Record
Adding or editing an A record is done through your domain's DNS zone, in DNS Zone Editor in cPanel or DNS Management in DirectAdmin. For the full step-by-step, see How to Add or Edit a DNS Record (A, CNAME, MX, TXT).