DEV Community

Haengjin Noh
Haengjin Noh

Posted on

Why I Built My Own URL Shortener (9rl.io) with Node.js and MongoDB

Why I Built My Own URL Shortener (9rl.io) with Node.js and MongoDB

Building a URL shortener is often seen as a "hello world" project for backend developers. However, when you combine Technical SEO with the need for full data ownership, it becomes a much more interesting challenge.

In this post, I’ll share why I decided to build my own tool and how I optimized it for performance and search engines.


1. The Motivation: Why Not Bitly?

As a digital marketer and developer, I had three main pain points with existing services:

  • Data Control: I wanted 100% ownership of my redirection data.
  • Speed: Generic shorteners often add extra tracking hops that slow down the user experience.
  • SEO Flexibility: I needed strict control over 301 redirects to ensure maximum "link juice" transfer.

That’s how 9rl.io was born.


2. The Tech Stack for Scalability

To keep the service lightweight and fast, I chose:

  • Node.js & Express: Perfect for handling high-concurrency redirect requests.
  • MongoDB: For fast and flexible data retrieval.
  • Tailwind CSS: To ensure a clean, mobile-first UI.
  • Cloudways: For reliable hosting and fast server response times.

3. Optimizing for Technical SEO

To make this tool effective for SEO, I implemented:

  1. Strict 301 Redirects: Unlike some shorteners, 9rl.io uses permanent 301 redirects for SEO value.
  2. Clean Slugs: Custom alias system for keyword-rich, high-CTR links.
  3. Minimal Header Bloat: Fast redirects by stripping unnecessary HTTP headers.

4. Beyond URL Shortening

I use this shortener to support my other projects, such as Easyunitcalc.com. It’s a hub for various web utilities, including unit converters, real-time countdown clocks for ticketing, and regional calculators for Korean social insurance. Having my own shortener allows me to track which tools are most popular and optimize my marketing strategy accordingly.

5. What's Next?

This is just the beginning. I am constantly exploring new ways to bridge the gap between development and marketing. I’m already working on even more advanced web technologies and automation tools, which I look forward to sharing with this community very soon.

I’d love to hear your thoughts! Do you prefer building your own tools or using established SaaS platforms? Let's discuss in the comments!

Top comments (0)