Adding a Host

2.3.1 Problem

You need to add a host to DNS.

2.3.2 Solution

Add an A and a PTR record for the host to the appropriate zones (which are almost certainly two different zones: a forward-mapping and a reverse-mapping zone). For example, to add a host called with the IP address to DNS, you could add this record to the foo.example zone data file: IN A

And you'd add this record to the zone data file for the reverse-mapping zone, which might be,, or, depending on how you break up administration of your reverse-mapping domain: IN PTR

2.3.3 Discussion

You're free to take advantage of the origin in the file to abbreviate the resource records. For example, if you're adding the A record to a line in the zone data file in which the origin is foo.example, you can write:

host IN A

If you're adding the PTR record on a line in which the origin is, you can write:


Since the default class is IN, for Internet, you can leave out the IN, too.

It's important to add PTR records for your hosts. Without PTR records, your hosts' addresses won't map to domain names, so they won't be able to access services that require reverse mapping, and your network management software may not identify them automatically.

You may also want to add other records for the host. If the host's domain name might appear on the right side of an email address, add an MX record specifying where mail addressed to the host should be delivered.

2.3.4 See Also

Section 2.5, for how to add an MX record; Section 2.10 to limit how long the records can be cached, Section 2.11 to learn how to handle multihomed hosts, and Chapter 4 of DNS and BIND.

Getting Started

Zone Data

BIND Name Server Configuration

Electronic Mail

BIND Name Server Operations

Delegation and Registration


Interoperability and Upgrading

Resolvers and Programming

Logging and Troubleshooting


DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu © 2008-2020.
If you may any questions please contact us: