Domain name geekery
If you’re not technical, there’s nothing to see here. Move along please.
OK, I’m writing an email address validation function. Why? Because everybody else has and why should I be different? The catch is, I’m trying to make it RFC-compliant rather than use the same noddy regular expressions everybody else does.
Ask me anything you like about RFCs 1035, 2396, 3696, 4291, 4343, 5321 & 5322. Go on.
Try this one: RFC 1035 says the following:
The labels must follow the rules for ARPANET host names. They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphen.
(A label is a component of a domain name, i.e. the “example” in example.com)
So is 3com.com a valid domain name? No? Somebody should tell them.
OK, I’ve answered my own question. RFC 1035 is “liberalized” by RFC 1123, specifically to allow domain labels to begin with a digit.
The confusion arises because the comparitively recent RFC 5321 refers back to RFC 1035 as its host name authority without mentioning RFC 1123. RFC 1035 is NOT marked as updated by RFC 1123.
So anybody reading RFC 5321 (i.e. me) could be forgiven for thinking that RFC 1035 was still in full effect.
It isn’t. Sort it out, IETF.