What Is a Homoglyph Attack? Punycode Phishing Examples Explained
A homoglyph attack (also called Punycode or IDN phishing) is a technique where attackers register a look-alike domain name by swapping one or more standard Latin letters for visually identical characters from another script—such as replacing Latin 'a' (U+0061) with Cyrillic 'а' (U+0430). To human eyes it reads like the real brand, while DNS resolves a separate ASCII Punycode domain starting with xn--.
Have you ever looked at a web address that seemed spelled 100% right—letter for letter—yet turned out to be a phishing site? That is the power of homoglyphs ('same-appearance characters'). Understanding the difference between visual Unicode scripts and underlying ASCII Punycode turns one of the internet's sneakiest tricks into something you can unmask in two seconds.
https://pаypal[.]com/signin (Contains Cyrillic 'а' U+0430)
https://xn--pypal-4ve[.]com/signin (Zero affiliation with PayPal)
- In most sans-serif fonts, Cyrillic small letter 'а' (U+0430) and Latin small letter 'a' (U+0061) share identical pixel shapes.
- Converting to ASCII reveals the xn-- prefix defined by RFC 3492 for Internationalized Domain Names.
- A password manager bound to paypal.com will refuse to autofill credentials on xn--pypal-4ve[.]com.
How Internationalized Domains (IDN) and Punycode Work
The Domain Name System (DNS) was originally built to understand only plain ASCII characters: English letters A–Z, digits 0–9, and hyphens. To support websites written in Arabic, Chinese, Cyrillic, Greek, Hebrew, and accented European alphabets, internet standards introduced Internationalized Domain Names in Applications (IDNA) alongside an encoding algorithm called Punycode (specified in RFC 3492).
Whenever a domain contains non-ASCII Unicode characters, browsers translate that label into an ASCII-Compatible Encoding string prefixed with the four characters xn--. Legitimate international websites rely on this every day—for example, a German domain containing an umlaut converts cleanly into an xn-- address behind the scenes.
Two Types of Homoglyph Attacks: Cross-Script Unicode vs. Plain ASCII Swaps
Attackers weaponize character similarity in two distinct ways, and defenders should recognize both:
- 1. Cross-script IDN / Punycode homoglyphs: Characters from Cyrillic (such as а, е, о, р, с, х) or Greek look identical or nearly identical to Latin letters a, e, o, p, c, x. If an attacker replaces every letter in a short word using a single non-Latin script, they can even avoid mixed-script browser warnings in certain contexts—though modern browsers increasingly fall back to displaying raw xn-- strings when spoofing risk is detected.
- 2. Plain ASCII look-alikes (typosquatting): No Unicode needed: placing 'r' and 'n' side by side ('rn') mimics 'm' in tight sans-serif fonts (rnicrosoft[.]com), uppercase 'I' mimics lowercase 'l' (paypaI[.]com in email text or social handles), and '0' mimics 'O'. Because these use ordinary Latin letters, they never trigger an xn-- prefix.
Why Browser Protections Alone Aren't Enough
Chrome, Safari, Firefox, and Edge all implement IDN display policies (guided by Unicode Technical Standard #39) that show raw xn-- Punycode in the address bar whenever a domain mixes Latin and Cyrillic characters in a single label. That stops many naive attacks once the browser tab is open on a desktop monitor.
However, victims often make the decision to trust a link before the browser address bar is ever visible: inside an email body, an SMS bubble, a chat message, a PDF invoice, or a social media bio where fonts render the Unicode string cleanly. And plain ASCII swaps like rn vs. m or l vs. I never become xn-- in any browser.
How to Catch Homoglyph Phishing Every Time
Because homoglyph attacks specifically target human eyesight, the best defenses let software compare exact bytes on your behalf:
- Let your password manager or passkey verify the domain: Password managers and FIDO2 passkeys compare raw underlying hostnames byte-for-byte. They are never fooled by Cyrillic 'а' or 'rn' pretending to be 'm'. If autofill stays silent on a login page, stop immediately.
- Inspect suspicious links in NoBait's URL Threat Inspector: Pasting any link into NoBait immediately flags xn-- Punycode labels, mixed character sets, and brand-impersonation patterns.
- Install browser-level link protection: Tools like the NoBait Chrome Shield inspect link targets before you submit credentials on look-alike domains.
Chapter 3 · Malicious Links & Fake Websites (Stage 3.1: Domain Magnifier)
Train your eye on Punycode specimens, rn-vs-m swaps, and deceptive subdomains in interactive side-by-side browser drills.
Frequently Asked Questions
What does xn-- mean at the start of a website domain?
The xn-- prefix means the domain uses Punycode (RFC 3492) to encode non-ASCII Unicode characters—such as accented letters or non-Latin scripts—into standard DNS format. While legitimate international sites use it, an xn-- domain pretending to be an English-named bank or cloud login is a major phishing warning sign.
What is the difference between typosquatting and a homoglyph attack?
Typosquatting relies on common typing errors (like amazn[.]com) or adjacent keys, whereas a homoglyph attack chooses characters that look visually identical on screen—such as Cyrillic 'а' for Latin 'a', or 'rn' for 'm'—so even careful readers don't notice a difference.
Will a password manager get tricked by a homoglyph domain?
No. Password managers and passkeys match the canonical Punycode/ASCII hostname stored in your vault, so pаypal[.]com (xn--pypal-4ve[.]com) will never match paypal.com.
