Why did hostnames get reversed?
I did some Googling and apparently my Google-fu is weak today.
I'm wondering why hostnames ended up being reversed. Ex: .com.example is now example.com.
I recall reading that the reversal happened somewhere during the development of a messaging protocol for ARPANET. com.example@user was reversed to user@example.com and then it just sort of stuck. Am I far off?
Does anyone have any resources or anecdotes that explain this at all? I think I may have even seen this explained in an HN thread once but was unsuccessful in finding it.
Thanks.
Comments
The earliest RFC which I know of which spells it out is RFC 805, https://tools.ietf.org/html/rfc805
It was chosen apparently because RFC 805 was standardizing to "mailbox@computer", and since 'mailbox' is more specific than 'computer' it became more and more specialized going left.As for why 'mailbox' comes first, it's presumably because that's someone's username. The very first thing you want to see is, "I'm sending this to drostie," and only afterwards do you need to know where that server is located.
Thanks for your answer, much appreciated.
I don't have any concrete evidence, but my guess is that having the repeating value (the TLD) at the front meant that storing domain names in a hashtable was inefficient. Lookups would be faster if the more-unique part was at the front of the string, since the string comparisons would run faster.
Wouldn't this make sense only if you weren't using a hashtable, i.e. a list or something else that had to be traversed?
such as a trie/patricia