You are talking about the third-level domain, typically called subdomain. In DNS speak it’s a label.
Such a DNS label can contain up to 63 characters, consisting of
a
-z
A
-Z
(however, they are interpreted case-insensitive)
0
-9
-
(Internationalized domain name would allow for more characters, but technically the same character set is used, see Punycode.)
Using www
is a very common convention, but in no way required.
A popular example with a different subdomain is Wikipedia. The English Wikipedia has the hostname en.wikipedia.org
, i.e., they use en
(in their case representing the language code for English) instead of www
.
Because www
is so common and many people add it to all URLs when typing them, websites typically adapt to it: either by providing both variants (with and without www
), or by redirecting from one variant to the other. (The latter is usually preferred because having canonical URLs is useful for many reasons.)
Note that domains don’t have to stop at the third level, you can have more levels, like fifth.fourth.third.example.com
. Some sites even use the www
convention for such domains, so they’d add www
to any domain, e.g. www.fifth.fourth.third.example.com
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…