The part before .com is exactly 63 characters — the maximum
length of a single DNS label.
A DNS name is a sequence of labels separated by dots. On the wire there are no dots: each label is stored as one length byte followed by its bytes, and the name ends with a zero byte for the root.
café.com is transliterated into plain ASCII before it is
sent — xn--caf-dma.com. That encoding is called punycode,
the xn-- prefix marks it, and the result still has to fit in
63 octets, which is why emoji and Chinese domains run out of room much
sooner than they look like they should.Worked example of a maximal name. Four labels of 63, 63, 63, 61:
Sixty-three characters sounds cramped, so count what it buys. A label is 36 possible characters at each end (no leading or trailing hyphen) and 37 in the middle, over lengths 1 to 63:
There are about 1080 atoms in the observable universe. One TLD
on its own has room for six billion billion domain names per atom.
Roughly 350 million are registered, which is 10-91 of
.com-shaped space: the namespace is not running out, the
pronounceable part of it is.
RFC 1035, not aesthetics. The label length byte only has values 0–63 available: the top two bits are reserved for message-compression pointers, which is why 63 is a hard ceiling rather than a suggestion. 255 is simply the size of the domain-name field in that same message format. Every resolver, authoritative server, and TLS stack written in the last forty years assumes those bounds, so raising them is not on the table.
253 characters, e.g. three 63-character labels and a 61-character label:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Technically the longest registrable domain — one label plus a TLD,
no subdomains — wants the longest TLD you can actually buy under. That is
.international at 13 characters. (Longer strings exist in the
root, like .travelersinsurance, but they are closed brand
TLDs.) So the ceiling for a name a member of the public can register in one
go is 63 + 1 dot + 13 = 77 characters, versus 67 for the
.com version of this site.
Swapping in .international also changes the shape of a maximal
253-character name: the TLD costs 14 octets on the wire, so you get three
63-character labels and then a 47-character one before you hit 255.
Caveat: the protocol maximum is not a promise. Plenty of registrars, browsers, and form validators impose stricter limits of their own.