Is it possible to have one (single) character top level domain name?

I'm writing a Regex to validate email. The only one thing confuse me is:

Is it possible to have single character for top level domain name? (e.g.: lockevn.c)

Background: I knew top level domain name can be from 2 characters to anything (.uk, .us to .canon, .museum). I read some documents but I can't figure out does it allow 1 character or not.

32064 次浏览

It is technically possible, however, there are no single character tlds that have been accepted into the root (as of the moment) so the answer is:

Yes, it is possible to have single character for top level domain name, however, there are currently no single character TLDs in the root.

You can see the list of TLDs that are currently in the root at this URL:

RFC-952 shows what a "name" is, this includes what is valid as a top level domain:

A "name" (Net, Host, Gateway, or Domain name) is a text string up
to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
sign (-), and period (.).

Additionally, the grammar from RFC-952 shows:

 <name>  ::= <let>[*[<let-or-digit-or-hyphen>]<let-or-digit>]

RFC-1123 section 2.1 specifically allowed single letter domains & subdomains, changing the initial grammar of RFC-952 from starting with just a letter to being more relaxed, so now you are allowed to have single letter top level domains that are a number:

2.1  Host Names and Numbers


The syntax of a legal Internet host name was specified in RFC-952.
One aspect of host name syntax is hereby changed: the
restriction on the first character is relaxed to allow either a
letter or a digit.  Host software MUST support this more liberal
syntax.

EDIT: As per @mr.spuratic's comment, RFC-3696 section 2 tightened the rules for top level domains, stating:

     There is an additional rule that essentially requires
that top-level domain names not be all-numeric.

This means that:

  • a. is a valid top level domain
  • 1. is not a valid top level domain

A very unscientific test of this shows that if I add "a" into my hosts file pointing to my local machine, going to http://a in my address bar does show my Apache welcome page.

You should DEFINITELY allow 1-character domains since some registries allow them not by accident (and I speak of quite big registries like UK, Germany, Poland, Ireland too - so important contributors to the Internet community, not oney exotic small exceptions). Since I also plan using such domains, that definitely work also with all e-mail services I used, letters AND numbers, I really would give the hint to allow this, else your script might need later correction.

Also some of the biggest internet companies use such domains - one of the most famous examples is Twitters t.co for shortening. Other companies I know of who have such domains are Facebook, Google, PayPal, Deutsche Telekom. But the list is longer and also some bigger investors hold them as assets.

By the way as proof there is a website trading this kind of domains online if You search for "1 letter domain names" :)