What is the maximum length of a converged IDNA domain name?

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)?

+8
dns database-design maxlength punycode idn
source share
3 answers

I understand that a limit of 255 characters should be considered after the IDNA conversion .

This is because DNS records have this character limit, and in general, DNS records can only contain letters, numbers, and hyphens ( from Wikipedia ). Thus, the DNS server uses the Punycode protocol version for its record, not the Unicode version.

+5
source share

OK, I think I recognized it myself and this fragment that I found (by searching the Internet) helped:

There were essentially two different options open to the implementation of internationalized domain names (IDNs). The first was to make changes to the domain name system (DNS), which would allow the use of Unicode characters for direct use. It was considered that this was too drastic a measure, and therefore the second option was chosen. This involves compiling an algorithm to indicate how a Unicode string should be converted to a resolved ASCII domain name. This ACE string (ACE stands for ASCII compatible coding) is then entered into DNS. The introduction of IDN means that for the first time, the DNS record no longer matches the domain name.

- Source

The answer is that the length to be respected is 255 characters as the DNS expects it.

My suspicion was correct. A domain name and a DNS entry are two different things with an IDN. This is the maximum length of the DNS record that is being calculated.

The domain name "müller.de" has 9 characters, but the corresponding ACE (ASCII Compatible Encoding) string "xn--mller-kva.de", however, has 16 characters.

This is the ACE string used by DNS, and the ACE string, which falls under the 255 character limit. This means that the maximum limit of its unicode (domain) version is determined by the number of Unicode characters used, and if - after IDNA conversion - the string is still placed within 255 characters.

Geez, the characteristics would perhaps be clearer in such things. Moreover, international domain names were somewhere around March 1, 2004. But I found the answer, and this is important.

Perhaps this can help someone who has the same question.

The simple answer related to my database field length is 255 CHAR.

The fact that I store domain names in their converted version of IDNA (punycode / ACE string) confirms only this maximum character limit.

+6
source share

RFC3492 talks about one of the features of os IDNA encoding:

Efficient coding: the ratio of the base string length to the extended string length is small. This is important in the context of domain names because RFC1034 limits the length of a domain label to 63 characters.

That's all. 63 characters is the maximum length for any domain name, regardless of whether it is in IDNA or in ASCII.

0
source share

All Articles