Eliminating the "www" Portion of a URL

Johnno johnno at nospam.casebook.org
Mon Mar 20 10:07:49 UTC 2000


Paul,

What you're trying to achieve is a snap.

In your zone file, make sure you have two records:

@        IN    A    216.132.25.7

This will cover the http://domain.com type address.

The following is equivalent:

domain.com.    IN    A    216.132.25.7

You can make "www" a CNAME as follows:

www    IN    CNAME    domain.com.

Or, make it an A record:

www    IN    A    216.132.25.7

I am not familiar with NT's implemetation of DNS, but certainly on BIND under
UNIX, the above will work like a charm.

Avoid CNAMEs wherever possible.  In some instances, they are quite practical
(such as the above implemetation of the www record.

Remember that you can only point a CNAME to a hostname which has a valid A
record.  NS, MX and SOA records should never be CNAMEs.

--
Johnno (johnno at nospam.casebook.org)
http://usrwww.optusnet.com.au/~japp



Paul Scott <pscott at edencomputers.com> wrote:

> Cricket,
>
> I still have been unable to figure this out.
> Perhaps you could give me a few more clues?
>
> Paul Scott
> Eden Computers
> 1700 E. Garry Avenue, Suite # 231
> Santa Ana, CA  92705
> (949) 863-1432
> (949) 863-1435 (fax)
> pscott at edencomputers.com <mailto:pscott at edencomputers.com>
> http://www.edencomputers.com
>
>
>
>
> > -----Original Message-----
> > From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org]On
> > Behalf Of Cricket Liu
> > Sent: Sunday, March 12, 2000 10:21 PM
> > To: bind-users at isc.org
> > Subject: Re: Eliminating the "www" Portion of a URL
> >
> >
> > > How can I setup my zone records for each of the domains
> > that I host so
> > that
> > > the "www" portion of an address does not need to be entered
> > when browsing
> > to
> > > a site's URL?  I have tried and tried to get this functionality, but
> > cannot
> > > seem to figure it out.  It seems that it would be as simple as the
> > > following:
> > >
> > > domain.com.    IN    A 216.132.25.7
> >
> > Yes.
> >
> > > www            IN    A 216.132.15.11
> > > domain.com     IN CNAME www
> >
> > No.  You can't add a CNAME record for domain.com because it
> > almost certainly already has an SOA record and at least two NS
> > records.
> >
> > > But this does not work, since the www address is an NT
> > server running IIS
> > > and domain.com. is already pointing to 216.132.25.7 (the primary DNS
> > > server).
> >
> > Then you have to ask yourself why domain.com is pointing to that
> > address, and whether it's more important to allow your visitors to
> > omit the "www" in your URL.
> >
> > cricket
> >
> > Acme Byte & Wire
> > cricket at acmebw.com
> > www.acmebw.com
> >
> > Attend the next Internet Software Consortium/Acme Byte & Wire
> > DNS and BIND class!  See www.acmebw.com/training.htm for
> > the schedule and to register for upcoming classes.
> >
> >






More information about the bind-users mailing list