Every URL shortener claims to make links "short." But a Bitly link is 22 characters. TinyURL is 26. That's not short — that's just... shorter.
So I built y.hn. Every link is 7 characters: y.hn/abc.
Why does length matter?
- SMS: 160 character limit. Every character counts.
- Twitter/X: Display text matters for readability.
- QR codes: Shorter URLs = simpler QR patterns = faster scanning.
- Print: Shorter URLs are easier to type manually.
The tech stack
- Framework: Next.js 16 (App Router)
- Database: PostgreSQL 16 with pgvector
- ORM: Drizzle ORM
- Auth: NextAuth v5 (Google, Apple, Email)
- Analytics: Custom-built click tracking (country, city, device, browser, UTM)
Anti-phishing at scale
URL shorteners are a prime target for phishing. We built a 7-layer detection system:
- Keyword blocklist matching
- Google Safe Browsing API
- PhishTank database
- URLhaus malware database
- VirusTotal (70+ security vendors)
- AI URL pattern analysis
- AI page content deep scanning
The AI content scanner uses free LLM models (DeepSeek, Groq, Cerebras, SiliconFlow). Total cost: $0.
Analytics without cookies
We track clicks using hashed IP + user agent for unique visitor counting. No cookies needed. Geographic data comes from Cloudflare headers.
Try it
y.hn — free, no account required for basic shortening. API docs for developers.
Top comments (0)