First things:
I store several domains in the database after I converted each domain name into its IDNA version. I need to know the maximum length, such as an IDNA-resolved domain name, so that I can determine the maximum length of the database field.
Known fact:
Now I know that the maximum number of characters in a domain name (including any subdomains) is 255 characters.
Where I lost him:
It is easy at first glance, but ... does this mean ordinary ascii characters of international characters (think UTF-8 encoding)?
To give you an example: The domain "müller.de" has 9 characters, when I ignore that "ü" is an international character that needs more bytes to represent. The IDNA version of "müller.de" is "xn--mller-kva.de", which has 16 characters. This shows a certain difference in the maximum length depending on whether “if” it is converted by IDNA or not.
Depending on what characters they mean, a maximum of 255 characters may be a version of an international character, a converted version of IDNA, or even both.
And this is where I lost a little ... especially since I have to consider that not all domains will be sensible, and things like "öüßüöäéêêê.example.äöüßüöäéèê-äöüßüöäêêê.test.äöüßüöäéèê.com" and even worse.
So, “guessing” and “hoping for the best” is not an option. I need to know for sure ...
Question:
Based on the known fact that the maximum number of characters in a domain name (including any subdomains) is 255 characters ... what is the maximum length of a converted IDNA domain name?
Or they meant that the converted IDNA (punycode) version is also limited to 255 characters (which would mean that domains with international / unicode characters would have shorter restrictions in their representation in Unicode because their converted IDNA version would have to respect the limit 255 char)?
dns database-design maxlength punycode idn
user1093284
source share