New::: - How do I?

Kevin Darcy kcd at daimlerchrysler.com
Wed Sep 5 00:49:07 UTC 2001


Trond Erling Hundal wrote:

> How do I make the configuration if I don`t want the hostname in my URL?
> You know. Instead of www.mydomain.com I want just mydomain.com

Add an A record for mydomain.com. Just like you'd add an A record for any
other name in your domain. What may be confusing you is how "@" and
leading whitespace work and interact with each other in the zonefile. If
you format your zone files like most people do, then you'll have an
SOA record with an owner name of "@", and a bunch of records (NS records,
maybe 1 or more MX records) after that, with leading whitespace. If you
put your A record after those records, with leading whitespace, but before
any non-leading-whitespace records, then you should be fine -- like the
NS/MX records, this A record will "inherit" the owner name from above,
which is "@", which substitutes for "mydomain.com". E.g.

@     soa ns1.mydomain.com. root.mydomain.com. ( etc. )
      ns ns1.mydomain.com.
      ns ns2.mydomain.com.
      mx 0 mail1.mydomain.com.
      mx 5 mail2.mydomain.com.
      a 1.2.3.4
www   a 1.2.3.4
ns1   a 2.3.4.5
ns2   a 3.4.5.6
mail1 a 4.5.6.7
mail2 a 5.6.7.8

In the worst case, you could specify the owner name explicitly, e.g.

mydomain.com. a 1.2.3.4

(Note carefully the trailing periods in both examples).

                           - Kevin




More information about the bind-users mailing list