What is a valid hostname?
A hostname is a name given to a computer to make connecting to it easier.
Instead of the IP address you can type the hostname, like the.widge.net.
Hostnames must be no longer than 255 characters in length. You can use a-z,0-9, and '-'.
A hostname cannot have any spaces nor can it start with a number or '-'.
more formally
<subdomain> ::= <label> | <subdomain> "." <label>
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>
<letter> ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case
<digit> ::= any one of the ten digits 0 through 9