DNS Quickie

How do I make it so that the address mydomain.com maps to my www.mydomain.com. Right now I have all of my services (mail, www, ns, ftp) run off the same computer, and my SOA looks like this:
<PRE>
@ IN SOA mydomain.com. hostmaster.mydomain.com
</PRE>

and I also have the A record:
<PRE>
mydomain.com. A my.ip.add.here
</PRE>

Who is Participating?

Yeah, but that's still in violation of the RFC because there are multiple A records for the IP.

There's nothing inheritly wrong with using CNAME's, if you do it correctly. That means that for every CNAME'd host that you want email delivered to, you've also created an MX record. The problem comes about from paranoid mailers that do a double lookup on the target system. They lookup the IP and then do a reverse lookup on that IP. In the case of a CNAME'd host the FQDN returned won't be the same as the target FQDN. Using an MX record side-steps that problem. Mailers are required to honor the MX record and the target of the MX host has matching A & PTR records.

I an doing the same exact thing that you are doing with my domain. One machine does everything. To point mydomain.com to www.mydomain.com, here is the way you do it. In you zone file for mydomain.com you add an "A" record for your domain:

mydomain.com. IN A 123.123.123.123

That's all you do and just do an ndc reload so that you DNS server picks up the change.

Hope that helps.

0

slyphAuthor Commented: 2000-03-22

I tried that and it didn't work ... I think I already had and A record for my domain, except that it didn't have the 'IN' in front of it. I printed my zone file below, perhaps it will help:

Uhh, your zone file is basically bogus. There should be only one host "A" record and CNAME records for it's aliases. If you name the machine ns1.mydomain.com in it's host file, the zone file should look like:

It's also safe to assume that a CNAME is not a legal host name for a e-mail address: webmaster@www.linux.bogus is an illegal e-mail address given the setup above. You can expect quite a few mail admins Out There to enforce this rule even if it works for you. The way to avoid this is to use A records (and perhaps some others too, like a MX record) instead:

www A 192.168.196.2

A number of the arch-bind-wizards, recommend not using CNAME at all. But the discussion of why or why not is beyond this HOWTO.

Oh, a little sidenote, the goddessnet.net. in my zone file as the name server above should be mydomain.com.

I an doing the same exact thing that you are doing with my domain. One machine does everything. To point mydomain.com to www.mydomain.com, here is the way you do it. In you zone file for mydomain.com you add an "A" record for your domain:

mydomain.com. IN A 123.123.123.123

That's all you do and just do an ndc reload so that you DNS server picks up the change.

It's also safe to assume that a CNAME is not a legal host name for a e-mail address: webmaster@www.linux.bogus is an illegal e-mail address given the setup above. You can expect quite a few mail admins Out There to enforce this rule even if it works for you. The way to avoid this is to use A records (and perhaps some others too, like a MX record) instead:

www A 192.168.196.2

A number of the arch-bind-wizards, recommend not using CNAME at all. But the discussion of why or why not is beyond this HOWTO.

Oh, a little sidenote, the goddessnet.net. in my zone file as the name server above should be mydomain.com.

0

slyphAuthor Commented: 2000-03-22

I told you, I already did that and it didn't work.

0

AGBCommented: 2000-03-30

You can insert proper CNAME (Canonical Name) records for all your services only.