How to add a DNS record with no subdomain in Mac OS X Server

binddomain-name-systemmac-osx-server

How do I add a DNS record, through the GUI or command line, to Mac OS X Server that is simply the domain name (with no subdomain)?

For example I want to resolve http://foo.com to 192.168.1.100.

There is no facility in the GUI, it forces you to add a subdomain.

Best Answer

Create a zone named "foo.com.", and inside it create a machine (A) record for "foo.com." -- the trailing period on the machine name indicates that the name is "fully qualified", and that the zone name shouldn't be implicitly added.