Setting Up DNS Records — [A] Record (address record)

What is an [A] Record?

An [A] Record or an Address Record, assigns an IP address to a domain or subdomain name.

The value of an A record is always an IP address.

How to check an [A] Record?

Use the dig command, to check which IP address is assigned to the domain name.

$ dig A centos.org +short
72.232.194.162
$ dig A wiki.centos.org +short
72.232.194.162

Adding [A] Record to DNS — Examples

Use the following syntax to add an [A] Record to a Zone File.

[A] Record for Domain

The following example indicates that the IP Address for the domain example.com is 192.168.0.100:

example.com. IN A 192.168.0.100

[A] Record for SubDomain

The following example indicates that the IP Address for the subdomain www.example.com is 192.168.0.100:

www.example.com. IN A 192.168.0.100

Wildcard [A] Record

The following example indicates that the IP Address for any subdomain of the domain example.com is 192.168.0.100:

*.example.com. IN A 192.168.0.100