DNS/BIND Resource Record: Address (A) Record

Posted January 4, 2004 by Quinn McHenry in BIND and DNS

The address record (A record) maps a hostname and fully qualified domain name with an IP address.


To add the host chef with IP address 192.168.5.100 to the domain tech-recipes.com. in the zone file for tech-recipes.com, use the following format:

chef.tech-recipes.com. IN A 192.168.5.100

Please note the period following the domain name in the record. This is critical because it tells BIND that the domain name is attached and complete (fully qualified). Without this period, BIND will add the domain name associated with the zone file to the end of this to create a record for chef.tech-recipes.com.tech-recipes.com. which is not what we want.

Because of this behavior, it is possible to use shorthand:

chef IN A 192.168.5.100

Whenever you add an address record (what could be called a forward lookup record), it is usually appropriate to add a zone file as described in this tech recipe.

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.