en

Punycode is an encoding that represents domain labels containing Unicode characters as plain ASCII. For example, café.com becomes xn--caf-dma.com, which lets internationalized domain names (IDN) work in the DNS.

Why Punycode is needed

The DNS historically understands only Latin letters, digits and the hyphen. So that domains written in Cyrillic, Chinese or with diacritics can work, the browser converts each label into its ASCII form with an xn-- prefix before sending the query. In the address bar and in the URL the user sees familiar text, while the Punycode version travels over the network.

How it looks

A few features of the encoding:

  • The xn-- prefix — marks that a label, such as a subdomain, is encoded under the IDN rules.
  • Per label — each part of the name is encoded, not the whole address; the dot separators stay as they are.
  • Homoglyphs — look-alike characters from different alphabets create a phishing risk, so domain zone registries restrict the allowed character sets.

This way support for national alphabets arrives without rebuilding the DNS, and domains stay reachable from any browser.

Punycode — encoding Unicode domains into ASCII
Learn more

Tag cloud