What Is an A Record and How Does It Work?
An A record is one of the most commonly used records in the Domain Name System. It connects a domain name or hostname to an IPv4 address, allowing browsers and other applications to find the server responsible for a website or online service.
When someone enters a domain such as example.com into a browser, DNS may return an A record containing the server’s IPv4 address. The browser can then connect to that address and request the website.
A simple A record looks like this:
example.com. 3600 IN A 192.0.2.10
This record says that example.com points to the IPv4 address 192.0.2.10. The value 3600 is the record’s Time to Live, or TTL, measured in seconds.
A records are simple in appearance, but they play an important role in website hosting, server migrations, subdomain configuration, load distribution, and DNS troubleshooting.
What Does the “A” in A Record Mean?
The letter “A” stands for Address.
An A record maps a hostname to a 32-bit IPv4 address. IPv4 addresses are usually written as four decimal numbers separated by periods, such as:
203.0.113.25
The A record does not contain a website URL, folder path, port number, or protocol. It only provides the IPv4 address associated with the requested hostname.
For example, this record:
shop.example.com. 3600 IN A 203.0.113.25
means that the hostname shop.example.com should resolve to 203.0.113.25.
What happens after that depends on the service running at the destination. A browser may request a website, while another application may connect to a different service hosted on the same server.
How Does an A Record Work?
Suppose a user enters:
https://example.com
The browser needs to locate the server for example.com. A simplified lookup process works like this:
- The browser checks whether it already has a recent DNS result.
- The operating system checks its local DNS cache.
- If no valid answer is available, the query is sent to a recursive DNS resolver.
- The resolver retrieves the authoritative DNS answer for the domain.
- The resolver returns the A record to the device.
- The browser connects to the returned IPv4 address.
If the authoritative DNS server returns:
example.com. 3600 IN A 192.0.2.10
the browser can attempt to connect to 192.0.2.10.
DNS only provides the address. It does not confirm that the server is online, that the website is configured correctly, or that the SSL certificate is valid.
What Information Does an A Record Contain?
An A record usually includes several fields:
example.com. 3600 IN A 192.0.2.10
Hostname
The hostname identifies the name to which the record applies.
example.com.
This may be the root domain, also called the apex domain, or a subdomain such as:
www.example.com.
api.example.com.
mail.example.com.
TTL
The TTL tells recursive DNS resolvers how long they may cache the record.
3600
A TTL of 3600 seconds equals one hour.
Record class
The value IN stands for Internet. It is the class normally used for public DNS records.
Record type
The value A identifies the record as an IPv4 address record.
IPv4 address
The final value is the address returned for the hostname.
192.0.2.10
Where Are A Records Commonly Used?
A records are used wherever a hostname needs to point directly to an IPv4 address.
Pointing a domain to a web server
A website owner may point the root domain to a hosting server:
example.com. 3600 IN A 203.0.113.25
Visitors who request example.com will receive that address during DNS resolution.
Pointing a subdomain to a separate server
Different subdomains can point to different systems:
www.example.com. 3600 IN A 203.0.113.25
api.example.com. 3600 IN A 198.51.100.40
admin.example.com. 3600 IN A 198.51.100.60
This allows the website, API, and administration service to run on separate infrastructure.
Using multiple addresses
A hostname can publish more than one A record:
example.com. 300 IN A 192.0.2.10
example.com. 300 IN A 192.0.2.11
example.com. 300 IN A 192.0.2.12
DNS resolvers may return all of these addresses, sometimes in a different order. This can provide basic traffic distribution or redundancy, although DNS alone does not check whether each destination is healthy.
Connecting services to fixed infrastructure
A records may also be used for application endpoints, control panels, file servers, monitoring systems, or other services that need a stable hostname.
Can a Domain Have More Than One A Record?
Yes. A domain or hostname can have multiple A records.
For example:
app.example.com. 300 IN A 192.0.2.20
app.example.com. 300 IN A 192.0.2.21
Clients may attempt to connect to one of the returned addresses. This is sometimes called DNS round-robin, although resolver and client behavior can affect the order in which addresses are used.
Multiple A records can help distribute traffic, but they are not a complete failover system. If one server becomes unavailable, DNS may continue returning its address unless an external health-checking system updates the records.
A Record vs AAAA Record
A records and AAAA records serve similar purposes, but they use different IP address formats.
A record
An A record points to an IPv4 address:
example.com. 3600 IN A 192.0.2.10
AAAA record
An AAAA record points to an IPv6 address:
example.com. 3600 IN AAAA 2001:db8::10
A hostname can publish both record types:
example.com. 3600 IN A 192.0.2.10
example.com. 3600 IN AAAA 2001:db8::10
When both records are available, the client and network environment determine which address is used.
Publishing an AAAA record without a working IPv6 service can cause connection problems for users whose devices prefer IPv6. Both the DNS record and the server network configuration need to be correct.
A Record vs CNAME Record
An A record points directly to an IPv4 address. A CNAME record points one hostname to another hostname.
A record example
www.example.com. 3600 IN A 192.0.2.10
CNAME record example
www.example.com. 3600 IN CNAME hosting.example.net.
With the CNAME record, DNS must then resolve hosting.example.net to obtain its address.
A CNAME is useful when the destination hostname may change its underlying IP addresses. The service provider can update those addresses without requiring the domain owner to modify the CNAME.
An A record is more direct, but it must be updated when the destination IPv4 address changes.
Can the Root Domain Use a CNAME Instead of an A Record?
Traditional DNS rules generally do not allow a standard CNAME record at the root of a DNS zone when that name also needs required records such as NS and SOA.
For this reason, the root domain usually uses A and AAAA records:
example.com. 3600 IN A 192.0.2.10
Some DNS providers offer features called ALIAS, ANAME, CNAME flattening, or similar names. These are provider-specific solutions that allow the root domain to follow another hostname while still returning address records to DNS clients.
These features may look similar in a control panel, but they are not ordinary CNAME records in the final DNS response.
What Is the Difference Between an A Record and a URL?
An A record contains an IP address. A URL contains more information.
Consider this URL:
https://example.com/account/login
It contains:
- The protocol:
https - The hostname:
example.com - The path:
/account/login
The DNS lookup only concerns the hostname. An A record cannot redirect users to a specific path and cannot specify whether HTTP or HTTPS should be used.
This is invalid as an A record value:
https://192.0.2.10/account/login
The correct A record value contains only the IPv4 address:
192.0.2.10
URL forwarding must be handled by a web server, redirect service, or registrar forwarding feature.
What Is TTL in an A Record?
TTL stands for Time to Live. It controls how long a recursive DNS resolver may keep an A record in its cache.
For example:
example.com. 86400 IN A 192.0.2.10
A TTL of 86400 seconds equals 24 hours.
If a resolver caches this record and the domain owner changes the address shortly afterward, that resolver may continue returning the previous IP address until the cached record expires.
This is why planned server migrations often include the following process:
- Reduce the TTL before the migration.
- Wait for the previous, longer TTL to expire.
- Update the A record to the new server address.
- Monitor DNS responses and server traffic.
- Increase the TTL again after the migration is stable.
Reducing the TTL after changing the address does not affect copies that were already cached with the previous TTL.
How Long Does an A Record Change Take?
An authoritative DNS server may publish a changed A record almost immediately. Users may still receive the previous value because of caching.
The time required depends mainly on:
- The previous TTL value
- Recursive resolver caches
- Operating system caches
- Browser DNS caches
- Whether all authoritative name servers have the same zone data
- Whether the user is querying the correct hostname
Many changes become widely visible within minutes or hours, but there is no universal completion time.
If the authoritative name servers already return the new address while some public resolvers return the old address, caching is the likely cause.
If different authoritative name servers return different addresses, the problem may be an inconsistent DNS configuration rather than ordinary propagation delay.
How to Check an A Record
You can use the DomainScan DNS Lookup tool to check the A record currently returned for a domain or hostname.
A basic check involves:
- Enter the domain or hostname.
- Select the A record type.
- Run the lookup.
- Compare the returned address with the expected server IP.
- Check the result from multiple resolvers if the record was recently changed.
When checking a website, test both the root domain and the www hostname:
example.com
www.example.com
They are separate DNS names and may have different records.
If one works and the other does not, compare their A and CNAME records.
Common A Record Problems
The A record points to the old server
This often happens after a hosting migration.
First, check the authoritative DNS response. If it already contains the new IP address, the remaining issue is probably caching. If it still contains the old address, the DNS record may not have been updated in the active DNS zone.
The record was changed at the wrong DNS provider
A domain may be registered with one company while using name servers from another DNS provider.
Changing DNS records in the registrar account will have no effect if the domain is delegated to different authoritative name servers.
Check the domain’s NS records before deciding where the A record must be edited.
The root domain works but www does not
The root domain and www are separate hostnames.
A working root domain record does not automatically create a record for www. You may need an additional A or CNAME record:
www.example.com. 3600 IN CNAME example.com.
www works but the root domain does not
This is the reverse situation. The www hostname may be configured correctly while the root domain has no A record or points elsewhere.
Check both names independently.
The A record is correct but the website does not load
A correct A record does not prove that the web service is working.
Possible causes include:
- The web server is offline.
- The server firewall blocks the connection.
- Port 80 or 443 is closed.
- The website is not configured for the requested hostname.
- The SSL certificate is invalid.
- The application is returning an error.
- A reverse proxy or CDN is misconfigured.
After confirming DNS, continue testing the server, ports, SSL certificate, and HTTP response.
Different DNS servers return different addresses
This may be normal shortly after a record change, but it can also indicate inconsistent authoritative servers.
Use a DNS propagation check to compare responses across multiple locations. Then query the authoritative name servers directly if the results remain inconsistent.
The address belongs to a CDN or proxy service
When a domain uses a content delivery network or reverse proxy, the A record may point to the provider’s network rather than the origin server.
This does not necessarily indicate an error. The proxy receives the visitor’s request and forwards it to the origin according to its configuration.
How to Change an A Record Safely
Before changing an A record, confirm the following:
- The new IPv4 address is correct.
- The destination server is ready.
- The website is configured for the domain.
- The SSL certificate covers the required hostname.
- The DNS zone being edited is authoritative.
- The current TTL has been considered.
For a website migration, it is often useful to keep the old server running during the transition. Some users may continue reaching it until cached DNS records expire.
Do not remove the old hosting environment immediately unless you are certain that no relevant cached responses remain and all required traffic has moved successfully.
Can an A Record Point to a Private IP Address?
Technically, a DNS zone can contain a private IPv4 address such as:
10.0.0.10
172.16.0.10
192.168.1.10
However, private addresses are not reachable directly from the public internet.
They are normally used inside private networks, virtual private networks, internal DNS systems, or split-horizon DNS configurations.
Publishing a private IP address in public DNS is usually not useful for ordinary internet visitors and may reveal unnecessary information about an internal network design.
Does an A Record Control Email Delivery?
Email delivery is primarily directed by MX records, not by the root domain’s A record.
For example:
example.com. 3600 IN MX 10 mail.example.com.
mail.example.com. 3600 IN A 192.0.2.50
The MX record tells sending mail systems to use mail.example.com. The A record for that hostname then provides the server’s IPv4 address.
If a domain has no MX record, some mail systems may attempt delivery using the domain’s address record, but relying on this fallback is not recommended. A properly configured mail domain should publish explicit MX records.
Does an A Record Redirect a Website?
No. An A record changes the IP address returned for a hostname. It does not issue an HTTP redirect.
For example, pointing:
old-example.com
to the same IP address as:
new-example.com
does not automatically redirect visitors from one domain to the other.
The web server must be configured to send a redirect response, such as a permanent 301 redirect.
Frequently Asked Questions
Can an A record point to a domain name?
No. A standard A record must contain an IPv4 address.
To point one hostname to another hostname, use a CNAME record or a provider-specific alias feature where appropriate.
Can an A record include a port number?
No. An A record contains only an IPv4 address.
Port selection is handled by the application, URL, service configuration, or other DNS record types designed for service discovery.
Can two domains point to the same A record?
Yes. Multiple domains can point to the same IPv4 address.
The web server can host multiple websites on one address and choose the correct site based on the requested hostname.
Should www use an A record or a CNAME?
Either can work.
A CNAME pointing www to the root domain is convenient when both should always use the same destination. A separate A record gives independent control but must be updated separately when the server address changes.
Why does my A record show a different IP address than my server?
The domain may be using a CDN, reverse proxy, security service, or load balancer. In that case, public DNS returns the provider’s address while the origin server remains behind it.
It may also indicate an outdated record, DNS cache, or incorrect DNS configuration.
Does deleting an A record take the website offline?
It can. Once cached copies expire, users may no longer receive an IPv4 address for that hostname.
The website might remain reachable through an AAAA record over IPv6, but this should not be assumed.
Final Thoughts
An A record connects a hostname to an IPv4 address. It is one of the fundamental DNS records used to make websites and internet services reachable.
Although the record itself is simple, correct operation depends on several related factors: authoritative name servers, TTL values, resolver caches, server availability, firewall rules, web server configuration, and SSL certificates.
When troubleshooting a website, begin by confirming that the correct hostname returns the expected A record. If the address is correct, continue checking the destination server and the service running on it.
Use the DomainScan DNS Lookup tool to inspect a domain’s current A record, and use the DNS Propagation Check when a recent change appears differently across networks or locations.