Re: [LONG] subdomains

From: George Greer (
Date: 12/08/00

On Wed, 6 Dec 2000, Peter Ajamian wrote:

>> I'm not sure how we'd do this.  I don't know of a way currently to make
>> BIND return the same IP address for any random string in a subdomain.  I've
>> known of places that have done it, so it's probably possible somehow.
>You could add an extra line after the rhudin entry like this...
>pathologicus            12H IN CNAME
>rhudin                  12H IN A
>*.rhudin                12H IN A
>eternal                 12H IN CNAME

For subdomain, *smack self*, I knew that... I haven't done it in so long I
forgot about the two methods:

setting the origin and then hostnames:
and just the hostname (rooted or not):

I was thinking of externally-hosted subdomains loaded locally, which is
what the /etc/named.conf editing could entail.

>This is a wildcard entry and it should have the effect of returning that
>IN A record for every subdomain request to

Yep, * works, just tried it.  Never had the occaison to try such a thing

>> If you give us a hostname, we do a CNAME.  If you give us an IP, we do an A
>> (authoritative) record.  CNAME's aren't allowed to have MX records (or any
>> other information), IIRC.
>Okay, I'm not positive about this, but I believe that a record CAN share
>CNAME and MX entries.  What you cannot do is point an MX record to a
>CNAME record, the hostname that you specify on the RIGHT side of an MX
>record must have an A entry and will not work with a CNAME, you can do
>whatever you want for the hostname on the LEFT side, though.  For
>example you couldn't do this...

I seem to remember BIND griping, so I looked up the error:

"%s has CNAME and other data (invalid)"

It'll also gripe about:

"NS points to CNAME"

Because it's hard to get the IP of the nameserver when you have to do a
lookup within that domain to get the nameserver for the domain.

>pathologicus            12H IN CNAME
>pathologicus            12H IN MX

root@bacon:~# tail -2 /var/named/        IN      CNAME        IN      MX 10

bacon named[458]: has CNAME and other data (invalid)
bacon named[458]: CNAME and OTHER data error
bacon named[458]: master zone "" (IN) rejected due to errors (serial 2000120802)

>In fact, for those records that have a CNAME entry, I would highly
>recommend accompanying the entry with a corresponding MX entry as well,
>the reason is simple, mail servers will follow the MX entry, but they
>won't follow the CNAME...

The MX record of the A record looked up by the CNAME is used.

>You don't need to mess with /etc/named.conf, you can do it like this...
>pathologicus            12H IN CNAME
>rhudin                  12H IN NS       NS1.MYDNSHOST.NET.
>rhudin                  12H IN NS       NS2.MYDNSHOST.NET.
>eternal                 12H IN CNAME

Yep, forgot about that.  It's been a while.

George Greer            | If it's about the CircleMUD mailing list,   | mail instead.

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 04/11/01 PDT