Internationalized Domain Names and Look-Alike Characters
How domain names carry non-English characters, what the xn-- form means and how to protect yourself from look-alike addresses.
Key takeaways
- An internationalized domain name is displayed in native characters but stored and queried in an ASCII form starting with
xn--. - The conversion uses an encoding called Punycode within a set of standards known as IDNA.
- Characters from different scripts can look the same, which allows deceptive names that differ from a genuine one invisibly.
- Browsers show the ASCII form in many suspicious cases, and password managers and bookmarks protect you better than your eyes.
Internationalized domain names let people use addresses with accented letters or entirely different scripts, such as Arabic, Cyrillic, Greek, Hindi, Japanese or Chinese. Underneath, the DNS still carries them as plain ASCII text beginning with xn--, and your browser or app translates between the two forms.
That helps billions of people read addresses in their own writing. It also creates a risk, because some characters from different alphabets look identical or nearly so. This article explains both the mechanism and the defenses.
Why the DNS needs a translation
Traditional hostnames use a restricted set of characters: the letters a to z, digits and hyphens, with case ignored. Huge amounts of software assume that. Instead of changing every server on the internet, the standards add a layer in applications: convert the name to a safe ASCII form before it goes anywhere near the DNS.
The framework is called Internationalizing Domain Names in Applications, or IDNA. The current version, often called IDNA2008, is described in RFCs 5890 through 5894. The encoding that squeezes Unicode characters into ASCII is Punycode, defined in RFC 3492.
A label that has been converted starts with the prefix xn--. For example, the German word bücher becomes xn--bcher-kva. The native form is called the U-label and the ASCII form the A-label.
What happens when you visit one
You type or click a name containing native characters. The browser first normalizes it, applying mapping rules such as converting capitals to lowercase. Then it encodes each non-ASCII label and sends an ordinary DNS query.
Because the DNS only sees ASCII, your records, zone files and certificates all use the xn-- form. If a control panel won't accept native characters, enter the encoded label. An IDNA and domain label inspector can convert and examine a name for you.
Length limits apply to the encoded form. A label can be at most 63 characters of ASCII, so a long native name can run out of room sooner than it looks.
Normalization and the rules about characters
Unicode often offers more than one way to produce what looks like the same text. An accented letter may be stored as a single code point, or as a plain letter followed by a combining accent. Full-width forms of Latin letters exist alongside ordinary ones. If each variation became a different domain, nobody could type a name reliably.
IDNA handles this by defining which code points are allowed at all, and applications normalize input to a consistent form before encoding it. Unicode Technical Standard 46 describes a widely used mapping that browsers apply, covering case folding and compatibility variants. The current rules disallow most symbols and punctuation, and place conditions on certain characters used for shaping in some scripts.
One practical consequence is that older and newer implementations have treated a handful of characters differently. The German sharp s is the best-known example: some historic software converted it to "ss", while the newer standard treats it as a letter in its own right. If your name contains such a character, register the variants where the registry allows and test in several browsers.
Working with the two forms
You'll meet both forms in day-to-day administration, so it helps to be able to convert them. Many programming languages have libraries for it, and recent versions of dig can accept native characters and convert them, depending on how they were built. When in doubt, supply the encoded label yourself:
dig xn--bcher-kva.example A +short The same applies to web server configuration. List the xn-- form as the server name, request the certificate for that form and use it in redirects and monitoring checks. In pages and printed material, show whichever form your readers recognize. Keep a note of both in your domain inventory, because a colleague who sees only the encoded string may not realize it is your own name and delete it as junk.
Registering an internationalized name
Not every registry accepts every script. Many restrict each ending to particular languages or character tables, and some reserve or block variants of a registered name so that nobody else can take a confusingly similar one. That's especially relevant where a writing system has more than one form of the same character, as with traditional and simplified Chinese. Whole top-level endings also exist in non-Latin scripts. See top-level domains explained.
If you register one:
- consider also registering a plain ASCII version and redirecting,
- test the name in the browsers and messaging apps your audience uses,
- expect some forms and older software to reject it,
- check mail support carefully.
Email deserves the warning. The domain part can be encoded as above, but non-ASCII characters before the @ require the internationalized email standards, which not every mail system implements. An ASCII mailbox alias avoids lost messages.
Look-alike characters
Unicode assigns separate code points to letters from different scripts even when they're drawn the same way. The Latin small letter a is U+0061. The Cyrillic small letter a is U+0430. In most fonts you can't tell them apart, but to a computer they're entirely different, so they produce different domain names.
| Looks like | Could actually be |
|---|---|
| Latin a, e, o, p, c | Similar-looking Cyrillic letters |
| Latin o | Greek omicron |
| Lowercase l | Capital I, or the digit 1 |
| The letter m | The pair r and n together |
| Plain letter | The same letter with a faint mark under or over it |
The last rows show that you don't need other alphabets to be fooled. Pure ASCII tricks are common, and they're covered in typosquatting. Using look-alike characters from other scripts is usually called a homograph or homoglyph attack.
How browsers and registries defend you
Browsers apply display rules. When a label mixes scripts in an unusual way, or closely resembles a well-known name, they may show the xn-- form instead of the native characters, and some show a warning page. The rules differ between browsers and change over time. Unicode publishes technical guidance on confusable characters and safe mixing that implementers draw on.
Registries help by limiting mixed scripts within a label. Legitimate holders of brands can also use dispute procedures against deceptive registrations.
None of this is complete. A name written entirely in one non-Latin script can still resemble a Latin word, and links shown inside chat apps, documents or email clients may be handled differently from the address bar.
How to protect yourself
The password manager point is the strongest everyday habit. If a login page looks right but your manager offers nothing, pause and check the domain before typing anything. Detecting fake login pages has more signs.
A padlock icon or HTTPS doesn't help here. A look-alike domain can obtain a perfectly valid certificate for itself.
For organizations
If your name is a likely target:
- List the obvious confusable variants of your domain, including common ASCII swaps.
- Register the few most dangerous ones, where affordable.
- Watch certificate transparency logs and new registrations for resemblances.
- Publish email authentication so that your real domain is harder to forge directly. Look-alike domains need separate vigilance, since your records don't govern them.
- Tell customers the exact addresses you use.
- Prepare a reporting route to registrars and hosts when an imitation appears.
When reviewing logs or mail headers, search for xn-- and decode what you find. Most such names are perfectly legitimate, so judge each in context and avoid blocking them wholesale, which would shut out real users of other languages.
If you meet an imitation
Say you receive a message linking to what appears to be your bank, and the address bar shows a name beginning xn--. Close the page without entering anything. Reach the bank through your app or a bookmark and report the message to it.
If you did enter a password, change it on the real site immediately, change it anywhere else you reused it, turn on multi-factor authentication and review recent account activity. If card or banking details went in, call the bank using the number on your card. The wider checklist is in what to do after clicking a phishing link.
Reports help others. Browsers and mail services let you flag deceptive sites, and the registrar and hosting company behind the domain accept abuse complaints. Include the encoded form of the name in your report, since it is unambiguous, whereas the native characters may be mistaken for the genuine address by whoever reads it.
Common questions
Is an xn-- address dangerous?
No. It's the normal encoded form of any internationalized name. It deserves attention only when you expected a plain English address and got this instead.
Can I use emoji in a domain?
The current IDNA standards exclude most symbols, including emoji. A few registries have allowed them anyway, but support is inconsistent and many applications will mishandle them. They're a poor choice for anything important.