Skip to Content

Check DNS A Record with Examples

DNS A record maps a domain name to the IP address (Version 4) of the server hosting the domain. The “A” stands for “address”. DNS A record indicates the IP address of a given domain.

DNS A record is the most fundamental type of DNS record. It is one of the primary records used in DNS servers.

DNS A record only holds IPv4 addresses. If a server has an IPv6 address, it will instead use an “AAAA” record.

DNS A record is specified by RFC 1035.

When do we use an A record in DNS?

The most common usage of A records is IP address lookups: matching a domain name (like “”) to an IPv4 address.

This enables a user’s device to connect with and load a website, without the user memorizing and typing in the actual IP address. The user’s web browser automatically carries this out by sending a query to a DNS resolver.

DNS A records are ideal for pointing our domain (or subdomain) to a server that has a static IPV4 address. To point to an IPV6 address we would need to use an AAAA record.

Example of DNS A record

We have two A records in this example. record type: value: TTL
@ A 14400
blog A 14400 => A => => A =>

The “@” symbol in this example indicates that this is a record for the root domain, and the “14400” value is the TTL (time to live), listed in seconds.

The default TTL for A records is 14,400 seconds. This means that if an A record gets updated, it takes 240 minutes (14,400 seconds) to take effect.

Blog is the subdomain of It points to another IP address.

One domain can have Multiple A records

The vast majority of hostnames only have one A record, but it is possible to have several. Some higher-profile servers will have several different A records as part of a technique called round-robin load balancing, which can distribute request traffic to one of several IP addresses, each hosting identical content.

For example, has several IPs. 0 IN A 0 IN A 0 IN A 0 IN A 0 IN A 0 IN A

One domain can have multiple A records in order to provide redundancy and fallbacks.

Multiple names could point to the same address. Each would have its own A record pointing to that same IP address.

Different Domain Name can have Same A Record

In name-based virtual hosting, also called shared IP hosting, the virtual hosts serve multiple hostnames on a single machine with a single IP address.

This is possible because when a web browser requests a resource from a web server using HTTP/1.1 it includes the requested hostname as part of the request. The server uses this information to determine which website to show the user.

So many domains share the same A Record with other domains.

How can we use a DNS A record for a subdomain?

For subdomains, we can add other A records for them. Each subdomain can have a A record.

For cases where an A record is preferred, we can point a particular subdomain to an IPV4 address follow this pattern:

www 10800 IN A

This record points only to the subdomain www, so visits to will go to this IP address.

What is wildcard DNS A record?

It is also technically possible to create a wildcard A record:

* 10800 IN A

This will point any unassigned subdomains to the IP address listed. It will not override other records for specific subdomains, but it will allow a visitor to reach the given IP address by by typing any other combination of letters or words as a subdomain. However, creating a wildcard A record has some potential downfalls.

First, not all situations will support wildcard A records. A wildcard A record will only work if the server and our extension both support this kind of record.

Second, since any possible subdomain will go to our main site, it makes it possible for someone to use an unflattering subdomain as a valid link to our site, such as

DNS A record Lookup

We can use dig to determine the A record associated to a domain name. The result is contained in the ANSWER section. It contains the fully-qualified domain name (FQDN), the remaining time-to-live (TTL), and the IP address.


We can use this command to query A record for a domain name.

$ dig
; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6794
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
; EDNS: version: 0, flags:; udp: 512
; IN A
;; Query time: 7 msec
;; WHEN: Wed Jun 23 13:54:31 UTC 2021
;; MSG SIZE rcvd: 55

Capture DNS Packets with tcpdump command

This is the output of tcpdump command after we run the above dig command. Check more info about how to use dig command to query DNS records here.

20:11:00.466866 IP > 60712+ [1au] A? (39)

This is the packet we get from the DNS server for this DNS query.

20:11:00.560294 IP > 60712 6/4/1 A, A, A, A, A, A (207)