The Ad That Was One Letter Off: Reading a Punycode Link

Web & API Security Level 2/4 ~3 min November 12, 2026

The challenge

A search ad offers the Ledgerwise sign-in. Check the ad link's real address in the source. Name the host the ad link really opens.

What you'll learn

  • Tell a link's visible text apart from its real destination
  • Recognise punycode (xn--) as the ASCII form of an internationalised domain
  • Explain how a Cyrillic letter makes a domain look identical to a brand
  • Name the controls that make lookalike sign-in pages harmless

Skills tested

Phishing analysisReading HTML sourceDomain name anatomy

Prerequisites

  • What a URL and its host are
  • What an HTML link (href) is

How it works

A link has two parts that have nothing to do with each other: the text you read and the href the browser follows. In a search ad, the title and the grey address under it are both text supplied by the advertiser, so only the href tells you where a click lands.

Domain names may contain letters from any script (internationalised domain names, IDN). Host names on the wire are limited to ASCII letters, digits and hyphens, so each such label is encoded with punycode (RFC 3492) and prefixed with xn--. The ASCII letters of the label come first, then a suffix that says which non-ASCII characters go where: xn--ldgerwise-g0h.example decodes to lеdgerwise.example, with a Cyrillic е (U+0435) in second place. Shown in Unicode, that name is pixel-identical to the brand. That is an IDN homograph. Browsers now fall back to showing the xn-- form in the address bar when a name mixes scripts like this, but by then the victim is already on a perfect copy of the sign-in page.

Common mistakes

  • Answering ledgerwise.example. That is the ad's display line, plain text the advertiser typed. The click follows the href.
  • Answering www.findwell.example. Every ad link starts with the search engine's /aclk click redirector, which only counts the click and forwards you to the adurl parameter. The destination is the host inside adurl.
  • Answering app.ledgerwise.example. That is the first organic result, the genuine sign-in page. The question is about the Sponsored link.
  • Dropping the xn-- part. xn-- and the -g0h suffix are part of the name: they encode the Cyrillic letter. Without them it is a different domain.
  • Retyping the decoded name by hand. Typed on a normal keyboard, the e is Latin and you get the real brand back. Copy the host from the source instead.

How to defend against it

  • Use passkeys or another phishing-resistant MFA (FIDO2/WebAuthn): the credential is bound to the real domain, so a lookalike page cannot collect or replay it.
  • Let a password manager fill credentials: it matches the exact saved domain and stays silent on a homograph, which is the warning.
  • Reach sign-in pages from a bookmark or the app, not from search ads.
  • For brands: watch for confusable registrations of your name (Unicode UTS #39 confusable skeletons, tools like dnstwist), report malicious ads to the ad network, and publish your real sign-in domains.
  • For companies: have DNS filtering block newly registered and mixed-script domains.

Full solution

Pro and Max members unlock the complete step-by-step walkthrough.

Go Pro

Community stats

221 completions
88% success rate
K1R4 First blood

Related Daily Hacks

42,000+ Hackers Real labs Free
Start Hacking Free or solve today's hack, no account needed