The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
Adding a new domain - a simple example 30 October 1999
Need more help on this topic? Click here
This article has no comments
Show me similar articles
This article describes how I added a new domain,, to my DNS.

This article is not comprehensive.  I know there are gaps which may confuse people who are new to DNS.  Please try Getting local names to resolve (DNS) first.

The zone files
When you register a new domain, the first step is to create the domain on the name server.  I will assume you already have named running and configured properly.  Hopefully, Getting local names to resolve (DNS) will be helpful if you need to get named running.

The first step was to create the zone file, /etc/namedb/   In this example, the following points should be noted and the details modified to suit your situation:

  • the best source of information for this zone is
  • the contact address for this zone is
  • the name servers for this zone are and
  • there are two names defined for this zone: and, both of which are aliases for, which is defined elsewhere.  You may wish to use examples from my zone files.
@       IN      SOA  (
                                199910281       ; Serial
                                3600            ; Refresh
                                900             ; Retry
                                3600000         ; Expire
                                3600 )          ; Minimum

; name servers

                IN      NS
                IN      NS

                IN      MX      5
; Define the rest of my subnet

www                             IN      CNAME
mail                            IN      CNAME


Modify named.conf
In order for named to use this zone file, you modify named.conf to include something like this:
zone "" {
        type master;
        file "";

And then you restart named like this:

ndc reload
Register the domain
Now you should register the domain.  I always use Well, I used to... until this happened. Since then, I've always used an OpenSRS reseller.
When it's done
When Network Solutions have done their job, you should be able to do this:
# whois
The Data in Network Solutions' WHOIS database is provided by Network
Solutions for information purposes, and to assist persons in obtaining
information about or related to a domain name registration record.
Network Solutions does not guarantee its accuracy.  By submitting a
WHOIS query, you agree that you will use this Data only for lawful
purposes and that, under no circumstances will you use this Data to:
(1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail
(spam); or  (2) enable high volume, automated, electronic processes
that apply to Network Solutions (or its systems).  Network Solutions
reserves the right to modify these terms at any time.  By submitting
this query, you agree to abide by this policy.

DVL Software Limited (LANGILLE2-DOM)
   PO Box 11-310

   Domain Name: LANGILLE.ORG

   Administrative Contact, Technical Contact, Zone Contact:
      Langille, Dan  (DL4720)  dan.langille@DVL-SOFTWARE.COM
      [No phone] [No fax]
   Billing Contact:
      Langille, Dan  (DL4720)  dan.langille@DVL-SOFTWARE.COM
      [No phone] [No fax]

   Record last updated on 27-Oct-1999.
   Record created on 27-Oct-1999.
   Database last updated on 28-Oct-1999 08:30:51 EDT.

   Domain servers in listed order:

But what about email?
The above isn't quite enough to allow you to send/receive for this domain.  For that, you must allow sendmail to relay mail for the domain in question.

Need more help on this topic? Click here
This article has no comments
Show me similar articles