DNS Setup


There are many different name servers for Macintosh and it is also possible that you don't have your own name server at all. It will give you the basic instructions for configuring new hosts:

If you don't know the difference between "host" and "domain", please go to this page and read about it.

To understand what you have to configure, here's what happens if a user enters a host:

  1. The browser (somewhere in the world) asks its own name server about the entered host to find the IP number for this host
  2. The users name server will ask your name server about the information
  3. Your name server will search for a host name in the given domain configuration
  4. If this results in a IP number, the number will be returned to the browser
  5. if this results in another host (CNAME - an alias function in DNS) this host is resolved again until a IP number is found
  6. After the IP number is returned to the browser, it will contact the server via this number

If you like to add a virtual host that is a new domain too, you need to register this domain with Internic. Until you do so, nobody outside your local network will be able to find the authoritive (your) name server to resolve the name to an IP number.

Compared to this, it is easy to add as many hosts to an existing domain (like abc.foo.com, sales.foo.com and john.foo.com). As the registered domain foo.com already exist, you just need to add "abc", "sales" and "john" to the domain configuration of foo.com.

Now back to the configuration. If you don't have your own name server, you need to tell the administrator responsible:

  • The name of the new host (e.g. welcome.comcon.de)
  • The IP number of your server

If you have your own server, you have to take care about this:

  • Only add new hosts to the right domain. It is e.g. useless to add "www.foo.com" to the domain configuration of the domain "somedomain.com".
  • It is clever to use CNAME records to your real server name than just A records to the servers IP number. They will make it easy to change the IP number of the server, as you only need to modify one A record: the A record of the real server name.

A CNAME record looks like:

[new host name] CNAME [your real server name]

and a A record looks like:

[new host name] CNAME [your servers ip number]

Make sure, that both names end in a dot (.), as most name server will add the default domain to any entry that will not contain a dot. Example:

welcome.comcon.de. CNAME web4all.comcon.de.

where web4all.comcon.de is a registered and active name of your own web server.

Problems and Tips

a)
Macintosh computers will cache DNS requests and they sometimes don't give you the latest name server changes. You have to restart your local mac in such a case.

b)
If you like to test your server offline (without a name server), you need to use a "Host file" with OpenTransport:

  • Open the file "Hosts" in your system folder and add an A records like "welcome.comcon.de. A 128.0.0.1" to it.
  • Go to the TCP/IP control panel and select the host file in the system folder.
  • Choose "AppleTalk (MacIP)" from the first popup menu (AppleTalk needs to be ON)
  • Choose "Using MacIP Manually" from the second popup menu
  • Set IP Address to 128.0.0.1
  • Clear all other fields

Using this method, you can add any number of local names that will point to your local mac to your OpenTransport configuration.

c)
As more than one name can point to the same IP number, the reverse lookup for that domain will only work for the main name. For all other names, you will get the main name back from a reverse lookup of the IP number.

d)
Finally, you need to set the servers name (in the server prefs) to the main name of your server. This will speed up server startup and will help Welcome redirect old browsers.