What is an A Record?
An A record (Address Record) is a fundamental DNS record type that maps a domain name to an IPv4 address. When someone types your domain into their browser, DNS servers use A records to find the IP address of the server hosting your website.
How A Records Work
When a user visits example.com:
1. DNS Query: Browser asks "What's the IP for example.com?"
2. A Record Lookup: DNS servers find the A record
3. IP Returned: The IPv4 address (e.g., 93.184.216.34) is returned
4. Connection Made: Browser connects to the IP address
example.com. IN A 93.184.216.34
This DNS record format shows:
- example.com. - The domain (trailing dot indicates root)
- IN - Internet class
- A - Record type
- 93.184.216.34 - The IPv4 address
A Record Configuration
Basic Setup
Most domain configurations need at minimum:
@ IN A 203.0.113.50 ; Root domain
www IN A 203.0.113.50 ; www subdomain
The "@" symbol represents the root domain (example.com without www).
Multiple A Records
A domain can have multiple A records for load balancing:
example.com. IN A 203.0.113.50
example.com. IN A 203.0.113.51
example.com. IN A 203.0.113.52
DNS resolvers typically rotate through these addresses (round-robin) or select based on geography.
TTL (Time To Live)
A records include a TTL value specifying how long resolvers should cache the record:
example.com. 300 IN A 203.0.113.50
A 300-second (5-minute) TTL means DNS changes propagate within 5 minutes. Lower TTLs enable faster changes but increase DNS query volume.
Common A Record Use Cases
Web Hosting
Point your domain to your web server:
@ → Your server's IPv4 address
www → Your server's IPv4 address (or use CNAME)
Subdomains
Create A records for different services:
api.example.com → API server IP
blog.example.com → Blog server IP
shop.example.com → E-commerce server IP
CDN Configuration
Some CDNs require A records pointing to their edge IPs (though CNAME is more common):
example.com → CDN edge IP
A Record vs Other Record Types
| Record | Purpose | Points To |
|---|---|---|
| A | IPv4 address | 93.184.216.34 |
| AAAA | IPv6 address | 2606:2800:220:1:... |
| CNAME | Alias | another.domain.com |
| ALIAS/ANAME | Root domain alias | another.domain.com |
Checking A Records
Using dig (Linux/Mac):dig example.com A
Using nslookup (Windows):
nslookup example.com
Using DomScan Health Check:
curl "https://domscan.net/v1/health?domain=example.com"
# Returns DNS configuration including A records
Best Practices
1. Always set both @ and www: Users type domains both ways
2. Use appropriate TTLs: 300-3600 seconds for most cases; lower before planned changes
3. Consider AAAA records too: IPv6 is increasingly important
4. Monitor records: Incorrect A records mean site downtime
5. Document changes: Keep track of what IP addresses serve what purpose
A records are the foundation of web hosting. Understanding them is essential for any developer managing domain infrastructure.