Restrictions On Valid Host Names
Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "en.wikipedia.org" is a hostname. Each label must be between 1 and 63 characters long, and the entire hostname (including the delimiting dots) has a maximum of 255 characters.
The Internet standards (Request for Comments) for protocols mandate that component hostname labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen. However, a subsequent specification (RFC 1123) permitted hostname labels to start with digits. No other symbols, punctuation characters, or white space are permitted.
While a hostname may not contain other characters, such as the underscore character (_), other DNS names may contain the underscore. Systems such as DomainKeys and service records use the underscore as a means to assure that their special character is not confused with hostnames. For example, _http._sctp.www.example.com
specifies a service pointer for an SCTP capable webserver host (www) in the domain example.com. Note that some applications (e.g. IE) won't work correctly if any part of the hostname will contain an underscore character.
One common cause of non-compliance with this specification is that neither Microsoft Windows nor Android smartphones enforce the rule against using an underscore in hostnames. Since some systems will reject invalid hostnames while others will not, the use of invalid hostname characters may cause subtle problems in systems that connect to standards-based services. For example, RFC-compliant mail servers will refuse to deliver mail for MS Windows computers with names containing underscores.
The hostname en.wikipedia.org is composed of the DNS labels en (hostname or leaf domain), wikipedia (second-level domain) and org (top-level domain). Labels such as 2600 and 3abc may be used in hostnames, but -hi- and *hi* are invalid.
A hostname is considered to be a fully qualified domain name (FQDN) if all the labels up to and including the top-level domain name (TLD) are specified. The hostname en.wikipedia.org terminates with the top-level domain org and is thus fully qualified. Depending on the operating system DNS software implementation, an unqualified hostname such as csail or wikipedia may be automatically combined with default domain names configured into the system, in order to determine the fully qualified domain name. As an example, a student at MIT may be able to send mail to "joe@csail" and have it automatically qualified by the mail system to be sent to joe@csail.mit.edu.
General guidelines on choosing good hostnames are outlined in RFC 1178.
Read more about this topic: Hostname, Internet Hostnames
Famous quotes containing the words valid, host and/or names:
“Just as soon as we notice that someone has to force himself to pay attention when dealing and talking with us, we have a valid demonstration that he does not love us or that he does not love us anymore.”
—Friedrich Nietzsche (18441900)
“The white man regards the universe as a gigantic machine hurtling through time and space to its final destruction: individuals in it are but tiny organisms with private lives that lead to private deaths: personal power, success and fame are the absolute measures of values, the things to live for. This outlook on life divides the universe into a host of individual little entities which cannot help being in constant conflict thereby hastening the approach of the hour of their final destruction.”
—Policy statement, 1944, of the Youth League of the African National Congress. pt. 2, ch. 4, Fatima Meer, Higher than Hope (1988)
“Without infringing on the liberty we so much boast, might we not ask our professional Mayor to call upon the smokers, have them register their names in each ward, and then appoint certain thoroughfares in the city for their use, that those who feel no need of this envelopment of curling vapor, to insure protection may be relieved from a nuisance as disgusting to the olfactories as it is prejudicial to the lungs.”
—Harriot K. Hunt (18051875)