Originally, the DNS only recognised letters from the English alphabet (a–z), numerals and the hyphen. So-called internationalised domain names (IDNs), which use accented characters or other writing systems (such as Cyrillic or Chinese characters), are therefore converted before being entered into the DNS. This conversion is carried out using Punycode encoding.
How does it work?
Punycode converts any part of a domain name that does not consist solely of ASCII characters into a form consisting exclusively of ASCII characters, and prefixes it with xn--. The rest of the domain remains unchanged, so the .hu extension also remains the same. The conversion works both ways: the original name can always be restored from the encoded form.
The logic behind the coding is as follows:
- Unaccented characters are retained in their original order (the word
árvíztűrőbecomesrvztr); - this is followed by a hyphen;
- After the hyphen comes an encoded section which specifies which accented character is restored to which position.
Some examples:
| Form with diacritics | Punycode format |
|---|---|
szép.hu |
xn--szp-cma.hu |
kávézó.hu |
xn--kvz-ela5b9c.hu |
árvíztűrő.hu |
xn--rvztr-wqa0gx3bwi.hu |
Browsers query this format in the DNS in the background, but the address bar usually displays the original name with diacritics.
Which file extensions are supported?
The characters that can be used vary depending on the domain extension. In .hu domain names, in addition to unaccented letters, lower-case Hungarian accented letters (á, é, í, ó, ö, ő, ú, ü, ű) may also be used. The .fi domain, for example, allows Finnish and Swedish accented letters. You can find the exact rules on the page for the relevant extension, in the ‘Special characters’ section.
Where do I need to enter the Punycode?
- In DNS zones and name server settings: many interfaces only accept the
xn--format. - Regarding SSL certificates: the domain is always listed in Punycode format in the certificate; this must also be specified in the CSR.
- In older programs: certain email clients, FTP clients and server software only support the ASCII format.
To convert the domain, you can use an online converter or the command idn2 árvíztűrő.hu in the command line.
What should you look out for with accented domain names?
- Register the version without diacritics as well, and set up a redirect from one to the other. Many visitors type the address without diacritics, and it is difficult to enter diacritics on a foreign keyboard.
- It is advisable to use a domain without diacritics for your email address. Not all email systems handle email addresses under domains containing diacritics reliably.
- Be wary of URLs that look similar. Phishers also register domains that resemble a well-known address but contain characters from a different script (for example, the Cyrillic ‘а’ instead of the Latin ‘a’). As a result, in some cases, browsers will display the
xn--format in the address bar. If you unexpectedly see such a URL instead of a familiar website, do not enter any details on it.
How can I add a domain with accents to my hosting account?
You can read in detail about the process of adding accented domain names via the cPanel interface in our article ‘How do I add an accented domain name to cPanel?’.