MacDNS: Mapping Multiple Domains

How do I serve multiple domains with MacDNS? I want to map "www.sample.com" and "www.sample.org" to my Web server.
For each unique top-level domain name you want to serve, choose "New Zone File..." from the File menu and enter the domain name in the Zone Information dialog box. You can have multiple zone files open at once. Even if www.sample.org is just intended to be an alias to your Web server at www.sample.com, you still need to create a zone file for sample.org, because you are serving a host within that namespace.

In the Zone Information dialog for sample.org, enter the same information that you specified for the sample.com zone (with the exception of the Domain Name field, of course.) Add a permanent host entry for www.sample.org. You can then assign the IP address of the "real" host machine (www.sample.com) to this host.

When you map entries across multiple domains to a single IP address in this way, it's important to be aware of how reverse (PTR) queries for the IP address are handled. Only the canonical, CNAME or "real" domain name for a given IP address is returned.

MacDNS defines the canonical name for an IP address as the first permanent host entry it finds which matches that address. To ensure that MacDNS returns a particular name for a reverse lookup when cross-domain host names are mapped to an IP address, simply create or open the zone file containing that entry first.
Published Date: Feb 18, 2012