Dundonald <mark.dundon@gmail.com> wrote in news:70e50bf7-ba1d-4473-853a-
6e894ab907e3@e23g2000prf.googlegroups.com:
> Has anyone developed a web app that creates subdomain names on the
> fly? For example a users of our web service can create a subdomain on
> our main domain name, such as customersusername.ourdomainname.com?
>
> I'm just wondering how this could be done.
c.f. the O'Reilly "cricket" book on DNS for the gory technical details,
<http://www.oreilly.com/catalog/dns5/>.
With the reference implementation of DNS (BIND), you would need to:
1. If the 'subdomain' points at a single host, modify the zone file for the
master domain, by adding a new A or A6 (if you're using IPv6) record for the
new subdomain. Modify the zone file for the reverse zone to point the host's
IP address at the newly-created host name.
or
1. If the subdomain may contain more than one host, create a new zone file
for the new subdomain. This can probably be templated, using a tool such as
velocity.
2. Modify the zone serial number in the SOA record of the second-level
domain. This tells the DNS server that the zone data has changed.
3. If the subdomain required the creation of a new zone file for the
subdomain, modify the file /etc/named.conf to point the new zone at the new
zone files.
4. Forcibly restart the name server.
Much of this would be considerably easier if the name server is itself open-
source and implemented in java, but in any case, a thorough grounding in the
domain naming system will be essential if you wish to accomplish this task.
Cheers!
GRB

Signature
---------------------------------------------------------------------
Greg R. Broderick usenet200705@blackholio.dyndns.org
A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
Dundonald - 01 Jan 2008 01:12 GMT
> Dundonald <mark.dun...@gmail.com> wrote in news:70e50bf7-ba1d-4473-853a-
> 6e894ab90...@e23g2000prf.googlegroups.com:
[quoted text clipped - 44 lines]
> Q. What is the most annoying thing on Usenet?
> ---------------------------------------------------------------------
Hey Greg thanks for your post and the info. I'm currently
transferring my service to a new host so I'm going to take a look at
the above and how I can programmatically automate this process, if at
all possible.