How to run your own Top Level Domain

What does it take to run a Top Level Domain Registry? And what’s more easy to run: a ccTLD or gTLD?

Opinions so far have ranged from “it’s easy” to “it’s a serious business” – both of which are obviously far too vague to being to measure what is an intriguing question. Some suggestions fall down in favour of the easy option: “only 5 ccTLDs show 24 x 7 support”, “registries are not difficult to run”. Others say, “it requires great technical skills, and business approach”. They maintain that the while technically and even theoretically it is easy to run a top-level domain, the realities mean providing and/or selling domains, advanced review systems, legal considerations and so on.

( the above was quoted from http://blog.icann.org/?p=21 )

It’s with some what of a geeky pride that I stand up and say: “I run my own top level domain (and you don’t)“, and I thought I might write a little article on how you can put your own geek hat on and say for yourself, that you run your own top level domain.

(Please don’t hurt my geek pride by saying dotING is not part of ICANN’s official root)

I will be looking at everything from technical requirements, through to staffing requirements and costs [which I did in my last post]. I will look at what software is needed to successfully operate a top level domain, the hardware and the management skills.

By reading this guide, I will assume that you know how to change the network settings for your operating system (i.e., change your DNS server(s)) and that you know how to install (but not configure) BIND. I will also assume that you run a decent operating system that is not based on the Windows architecture.

Required software
For this, I will presume you already have BIND (I recommend version 9) of some sort installed on your machine. I will be using Ubuntu 7.10 ( yes, I know I need to upgrade 🙂 ), with the BIND that ships with Ubuntu. Other installations of BIND may or may not be similar. If not, I would suggest reading up on a basic BIND tutorial.

sudo apt-get install bind9 dnsutils

The first config change
The first thing I do when I set up an Ubuntu machine to serve my own custom TLD, is I change the first few lines of /etc/bind/named.conf (this can be different on other distro’s) to say something like this:

options {
recursion yes;
allow-query { any; };
};

zone “.” in
{
type slave;
file “/etc/bind/db.root”;
masters { 75.127.96.89; };
notify no;
};

// This is the name of the TLD that I want to create
zone “mytld” {
type master;
file “/etc/bind/mytld.zone”;
allow-transfer { any; };
allow-query { any; };
};

A few things have changed. First, we have almost finished setting up the DNS server to start resolving OpenNIC Top Level Domains (such as .geek). Also, the framework for the new local mytld top level domain is put in place.

Now all that is needed is for us to finish setting up OpenNIC resolving (the “.” zone) and to make our first domain in the mytld top level domain to start resolving.

# cd /etc/bind
# mv db.root db.root.backup
# dig . ns @75.127.96.89 > db.root
#
sudo /etc/init.d/bind restart

By now, when you switch your computer to your new BIND setup, you should be resolving sites like google.com just like before. Not only should you resolve sites in .com etc, but also .geek (try sharesource.geek)

If this is working, all that is left is to create the /etc/bind/mytld.zone file;

$ORIGIN .
$TTL 3600       ; 1 hour
mytld                IN SOA  this.computer.com. bob.this.computer.com. (
                                2009010101 ; serial
                                3600       ; refresh (1 hour)
                                3600       ; retry (1 hour)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
$TTL 86400      ; 1 day
$ORIGIN mytld.
www                     A       202.172.90.1
bob                     A       202.172.90.2

This file looks complicated, but really, it’s not too hard to understand! The third line starts the authority, which basically says to other servers that use this top level domain “look, this.computer.com runs this computer. and bob@this.computer.com administrates it!”

The next lines say that “The following records will last for 1 day, so if the other DNS servers look up this address, they don’t need to ask for another 24 hours”. The line following “$TTL 86400” says “I am going to be lazy… all domains (at the left hand side) are going to have mytld. at the end”.

The last two lines state that the domain www.mytld will resolve to the IP 202.172.90.1, and the domain bob.mytld will resolve to the IP 202.172.90.2.

# sudo /etc/init.d/bind restart

A quick restart of BIND, and we should be able to resolve domains like www.mytld and bob.mytld on the local machine!

# dig www.mytld @127.0.0.1
; <<>> DiG 9.4.1-P1.1 <<>> www.mytld
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25028
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 6

;; QUESTION SECTION:
;www.mytld.                      IN      A

;; ANSWER SECTION:
www.mytld.               86400   IN      A       202.172.90.1

This means that your new top level domain is now resolving locally.

Think you have the killer domain?
Well, there is a way that you can share it with the world, and let other people share in the joy of your new top level domain! Goto OpenNIC, and ask if they would like to add your top level domain into their root.

Think editing config files is a pain everytime someone wants a new domain, or wants to change some basic information? Well, my top level domain administration software, Galium, will fix those problems for you right up 🙂

Please, if you think that something is missing, or you want some clarification or anything like that, leave a comment, and I will get back to you!

5 Comments on “How to run your own Top Level Domain”

  • Tim Groeneveld

    says:

    * 🙂

  • Chris

    says:

    What’s the IP address you have in named.conf?

  • Tim Groeneveld

    says:

    Hi patrice!

    If you want to register a top level domain in OpenNIC, you need to use the OpenNIC DNS Servers first, so that you can go to TLD’s that run on the OpenNIC network. This page here at OpenNICproject.org should help.

  • patrice

    says:

    hey..
    i have gone to every link and absolutely can not find out how to register a top level domain such as .geek.. none of the links in OpenNIC work at all .. I’ve tried from several computers..

    please help.. i have some names i want to register…

    thanks
    patrice

Leave a Comment

Your email address will not be published. Required fields are marked *