Domain name as hostname

Shane Castle swcxt at co.boulder.co.us
Thu Jan 13 18:34:40 UTC 2000


In comp.protocols.dns.bind, Jack Wenzinger<jwenzinger at hotmail.com> wrote:

>I have a requirement to create a DNS entry so that our domain is also a 
>device that resolves to our www.company.com.  I had thought that this could 
>be accomplished by creating a CNAME record like:
>    company.com.   IN    CNAME   www.company.com.
>This worked on the Primary server, however it created two problems:
>The secondary server could no longer obtain the db.company file, it would 
>now look at the www.company.com server for the file.
>The other problem is that mail was affected.  There is a statement for mail:
>    comany.com.    IN    MX   5   mailserver1.company.com
>This statement precedes the CNAME statement above.
>Anyone know the proper way to set this up?  I wasn't able to find the info 
>out of the Oreilly book.

Just add an A record for the parent domain.  It would look like:

    $ORIGIN company.com
    @	IN	SOA	ns hostmaster ( serial and ttl info )
	IN	NS	ns.company.com
	IN	A	111.222.333.444		;<--- note new record
	IN	MX	5 mailserver1
    www	IN	A	111.222.333.444

where '111.222.333.444' is the address of your www server.  This way
you don't have any CNAMEs or CNAME-generated problems.

--
Shane Castle             | "Perfection, then, is finally achieved, not
Boulder County Info Svcs | when there is nothing left to add, but when
Boulder CO USA           | there is nothing left to take away."
                         |                - Antoine de Saint-Exupéry



More information about the bind-users mailing list