Sub topic 5
Lookalike domains, punycode, and malicious search ads
This chapter assumes you know what a cryptocurrency wallet and exchange are, and that you have used a browser to sign in or connect a wallet. The goal is to verify the website’s real host before entering credentials or approving a transaction.
How lookalike domains work
A domain name is the readable address used to find a website. The host is the domain portion of a URL, such as coinbase.com in https://coinbase.com/login.
Scammers register domains that resemble trusted services:
coinbase.com.login-verify.examplecoinbase-support.examplecoinbɑse.com, where one character may come from another alphabetcoinbase-secure-login.example
The first example does not belong to Coinbase. Its host is coinbase.com.login-verify.example, and the registered domain is usually login-verify.example. Read the host from right to left. The recognized organization normally appears immediately before the final public suffix, such as .com.
A subdomain can also mislead you. In coinbase.com.attacker.example, coinbase.com is only a subdomain of attacker.example. It does not prove that Coinbase operates the site.
Unicode and punycode lookalikes
The domain-name system traditionally uses a limited ASCII character set. Internationalized domain names allow characters from many writing systems. A Latin-looking character from another alphabet can make a fraudulent name appear genuine.
Browsers encode many such names as punycode. A label beginning with xn-- represents an encoded Unicode name. The visible browser display can vary by browser, language, and security policy, so do not rely on appearance alone.
Before signing in:
- Open the service through a bookmark or a URL you typed previously.
- Check the full host, not only the logo or page design.
- Look for misspellings, unexpected subdomains, and
xn--labels. - Confirm the domain through the service’s official documentation or a trusted app.
- Never connect a wallet merely because a page looks professional.
from urllib.parse import urlparse
OFFICIAL_HOSTS = {"coinbase.com", "www.coinbase.com"}
def check_url(url: str) -> str:
host = (urlparse(url).hostname or "").lower()
if host in OFFICIAL_HOSTS:
return "matches an official host"
if host.startswith("xn--") or ".xn--" in host:
return "punycode label: possible lookalike characters"
return "not on the allowlist: do not sign in"
print(check_url("https://www.coinbase.com/"))
print(check_url("https://coinbase.com.login-verify.example/"))The allowlist checks the complete hostname. It does not decide whether the page is safe in every other respect, but it rejects a common class of domain tricks.
Malicious search ads
Scammers can buy advertisements that appear above organic search results for terms such as “wallet login,” “exchange support,” or “claim token.” The advertisement may copy the brand’s name and graphics while linking to a phishing site.
Search ranking is not proof of ownership. Treat an ad as an untrusted link. Navigate from a saved bookmark, an official mobile app, or a verified support page instead. Inspect the destination before opening it, and never enter a seed phrase or private key into a website.
Verify before you trust
| Check | Safer result | Warning sign |
|---|---|---|
| Full host | Exact official hostname | Brand name appears only in a subdomain |
| Character set | Familiar, expected spelling | `xn--` or unusual Unicode characters |
| Entry path | Bookmark or official app | Sponsored search result or unsolicited message |
| Request | Normal sign-in or read-only page | Seed phrase, private key, or urgent wallet connection |
Exercise
Why is https://coinbase.com.login-verify.example/ unsafe even though the address contains “coinbase.com”?
Show answer
The complete hostname is coinbase.com.login-verify.example. The actual registered domain is login-verify.example, so the address is not an official Coinbase host.