Hostname - Internet Hostnames - Restrictions On Valid Host Names

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:

    It is not enough that France should be regarded as a country which enjoys the remains of a freedom acquired long ago. If she is still to count in the world—and if she does not intend to, she may as well perish—she must be seen by her own citizens and by all men as an ever-flowing source of liberty. There must not be a single genuine lover of freedom in the whole world who can have a valid reason for hating France.
    Simone Weil (1909–1943)

    When you are invited by someone to a wedding banquet, do not sit down at the place of honor, in case someone more distinguished than you has been invited by your host...But when you are invited, go and sit down at the lowest place, so that when your host comes, he may say to you, Friend, move up higher’; then you will be honored in the presence of all who sit at the table with you.
    Bible: New Testament, Luke 14:8,10.

    The instincts of merry England lingered on here with exceptional vitality, and the symbolic customs which tradition has attached to each season of the year were yet a reality on Egdon. Indeed, the impulses of all such outlandish hamlets are pagan still: in these spots homage to nature, self-adoration, frantic gaieties, fragments of Teutonic rites to divinities whose names are forgotten, seem in some way or other to have survived mediaeval doctrine.
    Thomas Hardy (1840–1928)