Making the Domain Name of Your Zone Point to Your Web Server

2.6.1 Problem

You want the domain name of your zone to point to your web server.

2.6.2 Solution

Add an A record to the domain name of your zone pointing to the IP address of your web server:

foo.example. IN A

2.6.3 Discussion

Adding such an A record lets people specify just http://foo.example/ (leaving out the leading "www") when accessing your web site. Several popular web sites publish their URLs in this form, including CNN.

Many people try to solve this problem by adding a CNAME record to the domain name of the zone, rather than an A record:

foo.example. IN CNAME

This, however, is illegal because it violates the dictum that an alias have no records other than a CNAME record associated with it.

If you have multiple web servers, you can add multiple A records for the domain name of your zone:

foo.example. IN A
foo.example. IN A
foo.example. IN A

The records are given out in round robin order, by default, as described in Section 2.8.

2.6.4 See Also

Section 2.4 for more information on CNAME records, Section 2.7 for pointing a domain name at a particular URL, not just a particular web server, and Section 2.8, for a description of round robin.

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: