how to setup DNS server and making sub-domains in DSL server

Paul Waring paul at
Sun Nov 6 19:50:49 GMT 2005

On Sun, Nov 06, 2005 at 11:38:59AM -0800, Edwin D. Vinas wrote:
> 1) Is it correct that I only need to register or pay for the main domain?

Yes, provided you choose a registrar who will allow you to change the
namservers on the daomin - i.e. they don't force you to use their
nameservers in conjunction with a web hosting package or something
( will definitely work as I use them for a similar setup to
the one you describe).

> 2) Is it correct that through my local DNS server, I can add sub hosts (sub1
> to sub3) without anymore registering those sub domains and pay for them in
> my main domain provider?

That's correct. Adding a subdomain is generally a case of adding one
line to the zone file for that particular domain (assuming you're just
adding a simple subdomain that isn't going to be delegated or receive
mail or anything comlicated like that) and telling Bind to reload the
zone file (/etc/rc.d/named reload will usually work, although I find I
often have to use restart instead of reload for some reason).

> 3) Provided that I already have successfully setup my local DNS server,
> Apache virtual hosting and main domain activated, is it straightforward that
> I can already access the sub domains (i.e., websites) from the Internet?

Assuming you're not behind a firewall of any type (or you setup the
relevant rules), then it should be fairly simple to make everything
accessible from the rest of the Internet. If your main domain works,
then any subdomains on the same machine should do as well.

> 4) Do I need to register sub1, sub2 and sub3 in any external domain
> provider?

No, you'd just tell your registrar to change the nameservers to whatever
your local DNS servers are. Most will have a control panel allowing you
to do this easily.

> 5) Can you provide some sample configs if you are already doing this setup?
>   Thank you in advance!

What kind of sample config? If you're not doing anything special, any
tutorial on DNS/Bind will show you how to setup subdomains.


Rogue Tory

More information about the freebsd-questions mailing list