How Punycode Represents International Domain Names
Convert a Unicode domain label to its Punycode-based ASCII form, check the round trip, and see why conversion alone does not prove registrability.
- domains
- dns
- internationalization
- guide
Punycode is an encoding used in internationalized domain names to represent a Unicode label with ASCII characters. In a domain, IDNA gives the ASCII form of an internationalized label the prefix xn--. For example, café.example becomes xn--caf-dma.example. The label example stays unchanged. RFC 3492 defines the encoding. RFC 5890 defines the IDNA label forms.
Follow one label from display to DNS and back
Start with the hostname alone. A URL scheme, path or query string does not belong in a label converter. Split café.example into its two labels at the dot. The first label, café, is the Unicode form. IDNA calls a valid Unicode label containing a non-ASCII character a U-label. For this label, the Punycode output is caf-dma. Adding xn-- gives the A-label xn--caf-dma. Compare the result with the original by decoding the A-label back to café. Treat .example as a documentation suffix in this walkthrough. IANA explains the special-use example names.
| Observation | Example |
|---|---|
| Unicode hostname | café.example |
| Label that needs encoding | café |
| ASCII DNS form | xn--caf-dma.example |
| Decoded first label | café |
Keep both forms in a handoff to another team. The Unicode spelling is the one a reader recognizes. The A-label is the one to compare when a DNS response, certificate inspector or configuration interface shows ASCII. The copyable text removes uncertainty about which spelling your team means.
Run three separate checks before you register a name
- Verify the intended Unicode string. The
éin the example can be a single character or appear visually the same asefollowed by a combining accent. An IDNA-aware processor checks normalization and applicable code-point rules. Inspect the original spelling before judging the displayed output. - Verify the IDNA form. The
xn--prefix alone cannot prove the label is valid. The encoding must decode to a valid U-label and round-trip under the IDNA rules. Use an IDNA-aware converter for a domain input rather than a generic Punycode encoder. RFC 5891 describes registration checks. - Verify the extension’s policy. An IDNA-valid label may still be ineligible for a particular extension. Verify its supported scripts, any variant rules and actual availability with the registry or registrar. IANA publishes registry-submitted IDN practices.
Compare the same identity across systems
Suppose your registrar shows café.example and a lookup tool shows xn--caf-dma.example. Convert the hostname through one known IDNA-aware implementation and compare the complete A-label form. If the expected forms agree, continue with the ordinary DNS lookup workflow and check the relevant record type. If the strings differ, resolve the identity before editing records or making any purchase. A successful conversion answers what one string encodes. It cannot establish what a registry offers or whether a real website has been configured.
