Just curious technically what is valid domain name
t. <- is that valid
localhost is valid
I remember reading something very short without even two words
Just curious technically what is valid domain name
t. <- is that valid
localhost is valid
I remember reading something very short without even two words
The other replies give you already some hints but I think they lack to separate two cases because your question is vague.
In fact I see 3 points:
The first point is covered by Calle Dybedahl, technically .
is the smallest label (or the empty label being diplayed as a dot). But this is not very useful just by itself.
To complete, each label of an hostname is 1 to 63 characters long. You can only choose between letters, digits and hyphen. Previously a label could not start with a digit but this restriction has been lifted long ago (otherwise 3com.com
would not be possible). However the restriction remains of a label not starting with hyphen. So you can have a 1 character label/name/domain name being any letter (as in "ASCII" letters that is exclusively 'a' to 'z', case insensitive) or digit.
So this would be technically valid and in some lab experiment where you control the root zone you could have that.
(all the above is covered by RFC952 first and then amended by RFC1123 to remove restriction on first digit; they may be terse documents to read, a gentler introduction would be on Hostname entry in Wikipedia).
Note that there is a subtle distinction between hostnames and names in the DNS in general: a hostname is a name in a DNS but not all names are hostnames, as technically a name can have any byte content, whereas an hostname is restricted by the rules above (and is mostly what people will see in their day to day life on the Internet, where other names serve other infrastructure purposes)
Now, second point, the current IANA root and its content today. There are no one character names there today and I doubt there will be one day.
It starts with ccTLDs being 2 letters long. There is a process to add new gTLDs but they are basically at least 3 characters long (a little more complicated than that for IDNs, where there could be labels with 1 or 2 codepoints but through IDNA rules this will be a xn--
label so more than 4 characters long as seen in the DNS).
Also, not all two characters combinations are existing in the IANA root today, as they are ccTLDs, and hence must represent "current" country as their list is taken, loosely (they are exceptions) from the ISO list of country names (ISO 3166-1 Alpha2)
Noone can predict what would happen, but at least there is no space today for applications on one character TLDs.
tadman reply covered this point a little and the associated third point, what works today.
In fact, being one or two characters TLD you could see the same problem, often described as "dotless domain". For example https://dk/
resolves because the .DK
TLD associated A/AAAA records to the label .dk
.
This is possible in ccTLDs but not for gTLDs, as ICANN is strongly against that based on different reasons, one among them is that they work poorly, see this report for details: https://www.icann.org/en/system/files/files/sac-053-en.pdf
Note that they do not work poorly because of problems in the DNS protocol, just because various end clients OS/applications are used to automatically append a domain name suffix (or more than one) if the input has not "enough" dots, which is certainly true for a dotless domain name.
See RFC 7085 "Top-Level Domains That Are Already Dotless"
(December 2013) for a listing of all "dotless" cases (at that time), such as .DK
, but they were 15 more. And even more if you count replies for MX
DNS type.
The shortest possible valid name in DNS is the name of the root zone, which consists of a single octet where all bits are zero. It is usually written out for humans as a .
character or as an empty string.
Technically t
is valid if your DNS resolver considers it valid, but getting that to be universally valid is the hard part.
If you can get ICANN to approve a single letter gTLD then yes one letter is the shortest. Until then it's two.