The world's shortest domain names

Dirk Loss - 2007-01-26

The idea

Some hosts on the Internet have really short names. Those hosts are useful if you like to test your Internet connection and do not want to type much:

$ ping
$ ping

I had found those two domains by chance. But then I wanted a more complete view and pondered some questions:

  1. How many more active three-letter domain names (x.yz) are there?
  2. Which of those short domain names sound really cool?
  3. Which hosts with a three-letter fully qualified domain name (FQDN) answer a Ping?
  4. Which of those FQDNs can be typed most easily?
  5. After all, which countries (registries, top level domains) allow one-character second level domains?

You can see what I did below. If you are just interested in the results, please take a look at the list of three-letter domains or download the whole collection of files I generated.

If you are interestend in long domain names, please look here, here and here. And don't forget Jimmy Juice, a really cool funk and soul band who once presented their domain name ( which is their real band name) on stage, printed on a big roll of wall paper. Great show!

A complete list of three letter domains

Top level domains

First we need a list of top level domains. Googling for "top level domains" leads to a nice Wikipedia article. Looking at the list makes clear that only the country-code top level domains, which all consist of only two characters, are relevant. Because all generic top- level domains (.com, .org, .info, ...) have at least three characters.

So we have to search for a list of country-code top level domains (ISO 3166-1-alpha-2). Just google for "3166-1-alpha-2 filetype:txt" and download the following file:

$ wget
$ head list-en1-semic.txt
This list states the country names (official short names in English) in alphabetical order as given in ISO 3166-1 and the corresponding ISO 3166-1-alpha-2 codeelements. The list is updated whenever a change to the official code list in ISO 3166-1 is effected by the ISO 3166/MA. It lists 240 official short names and code elements. One line of text contains one entry. A country name and its code element are separated by a semicolon (;).


Now the header and the empty line can be deleted by using

sed -i~ '1,2d' list-en1-semic.txt

We now have a list of 244 country-code top level domains:

$ wc -l list-en1-semic.txt
244 list-en1-semic.txt

I use Python to extract the domain codes from the file:

$ python
>>> lines = file("list-en1-semic.txt", "rU").readlines()
>>> tlds = [line.split(";")[1].lower() for line in lines]
>>> file("tlds.txt", "w").writelines(tlds)

Second level domains

Which characters are allowed for second level domains?

RFC3696 says: [...] the labels (words or strings separated by periods) that make up a domain name must consist of only the ASCII [ASCII] alphabetic and numeric characters, plus the hyphen. No other symbols or punctuation characters are permitted, nor is blank space. If the hyphen is used, it is not permitted to appear at either the beginning or end of a label.

Because we are only interested in 1-character second-level domains, the hyphen is not allowed. So there's no "" domain.

Constructing the list of candidates

$ python
>>> import string as st
>>> s = st.ascii_lowercase+st.digits
>>> tlds = file("tlds.txt").readlines()
>>> names = ["%s.%s" % (left,right) for left in s for right in tlds]
>>> file("candidates.txt", "w").writelines(names)

Now we have a list of 244*36 = 8784 potential three-letter domain names:

$ head -5 candidates.txt
$ wc -l candidates.txt
8784 candidates.txt

Who does really exist?

DNS resolving

Ok, let's resolve these names to IP adresses, in order to see which ones are active. There is no real need for sophisticated multi-threading here, because even if we can do only 5 DNS lookups per second, we'll be finished in half an hour. I think that's acceptable.

$ for h in $(cat candidates.txt);do
  host -t A >> result.txt
$ cat result.txt
Host not found: 3(NXDOMAIN) has address
Host not found: 3(NXDOMAIN) has address has address
Host not found: 3(NXDOMAIN)
Host not found: 3(NXDOMAIN) has address
Host not found: 3(NXDOMAIN)

Applying a filter to get the result

Taking only those with an A record gives us to a list of 1431 really short domain names:

$ grep "^.\... has address" result.txt | cut -d' ' -f1 | sort -u |
     sort -t. --key=2,3 > shortdomains.txt
$ head -5 shortdomains.txt
$ wc -l shortdomains.txt
1431 shortdomains.txt

So almost a sixth of all 8784 potential 3-letter names really exist. These short domain names are not so rare as I thought...

My favourites

Now let's look for sites with a cool name:

$ less shortdomains.txt

I found the following ones quite nice:

And personally I think that is the one that is most easily typed when pinging:

$ ping

Whom to ask in the future

Not all registrars allow one-letter second level domains? In Germany, not even two-letter second level domains are allowed. So let's look in which countries you can get really short domain names:

$ cut -d'.' -f2 shortdomains.txt | sort | uniq > registrars.txt
$ head -5 registrars.txt
$ wc -l registrars.txt

So next time we will only ask those registrars...


Nmap ping sweep

Which domains point to hosts answering ICMP echo requests? We'll use Nmap ping scans for this:

$ nmap -sP -v -PE -iL shortdomains.txt -oG pinged.txt
Nmap finished: 1430 IP addresses (1079 hosts up) scanned in 525.023 seconds
Raw packets sent: 2104 (58.912KB) | Rcvd: 1079 (49.644KB)

(Of course we could just scan the IP addresses and afterwards look in our result.txt file to find the corresponding domains. Would have been faster but slightly more work.)

Now, let's check which ones are up:

# grep "Status: Up" pinged.txt | sort -u | cut -d" " -f2,3 | 
      cut -f1 > pingable.txt

We produce a nice list of ip domain pairs:

$ grep "has address" result.txt | cut -d' ' -f1,4 > host-ips.txt

Fast responders

Finally, which ones are likely to have low round-trip times (from my location in Germany)? For a quick start, let's just take those with a reverse-lookup'ed hostname in .de.

$ grep "\.de" pingable.txt > pingable-de.txt
$ cat pingable-de.txt ( ( ( ( ( ( ( ( ( (

I use Python again to lookup the short domains for those IP addresses:

$ python
>>> lines=file("host-ips.txt").readlines()
>>> t=[(line.split()[1],line.split()[0]) for line in lines]
>>> d=dict[t]
>>> pingable=file("pingable-de.txt").readlines()
>>> p = [line.split()[0] for line in pingable]
>>> for i in p:
...    print i, d[i]

Manually pinging those hosts shows several ones with low round-trip times.

Personally I will probably choose in the future if I need a fast response.

Even shorter...

Added on 2007-01-28

I found out that there are even shorter domain names with hosts answering a Ping than those I described below:

$ wget
$ sed -e "1,2d" list-en1-semic.txt | cut -d";" -f2 > tlds.txt
$ for t in $(cat tlds.txt); do host -t A $t | grep "has address" | cut -d" " -f1,4 >> hosts-ip.txt; done
$ cat hosts-ip.txt

The following hosts answer Pings: AI, BI, IM, IO, PN, SH, TM and UZ. Under Windows you will have to add a trailing dot to the domain name to avoid having your local domain name added autmatically:

c:\>ping tm.

Ping tm [] mit 32 Bytes Daten:

Antwort von Bytes=32 Zeit=88ms TTL=57
Antwort von Bytes=32 Zeit=94ms TTL=57
Antwort von Bytes=32 Zeit=93ms TTL=57
Antwort von Bytes=32 Zeit=84ms TTL=57

Ping-Statistik für
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 84ms, Maximum = 94ms, Mittelwert = 89ms

Moreover, the following hosts are reachable via http: AI, BI., IM, IO, PN, TM, UZ.

And if you use OpenDNS as a nameserver (IMHO not such a good idea), you can even try the following expression:

ping .

Apparently, these short domain names / host names will not work with some Windows DNS servers. If you do have problems, please try the slightly longer ones below or use a Web based DNS lookup service.

© 2007 Dirk Loss - Last Changed: 2007-07-07