DEV Community

nly.kr
nly.kr

Posted on

How I Built a URL Shortener with Click Analytics, QR Codes, and Custom Short Domains

How I Built a URL Shortener with Click Analytics, QR Codes, and Custom Short Domains

URL shortener platform showing short URL generation, link analytics, QR codes, and custom domain features by NLY

There are already many URL shortener services available.

So why build another one?

While working on web tools and developer utilities, I noticed that a simple short link was often not enough.

Developers and marketers usually need more than just:


long URL → short URL

Enter fullscreen mode Exit fullscreen mode

They need to know:

  • How many people clicked the link
  • Where the traffic came from
  • Whether the link can be shared as a QR code
  • Whether they can use their own short domain
  • How to manage links over time

That was the reason I built NLY URL Shortener.


The basic idea behind a URL shortener

A URL shortener maps a long URL to a short identifier.

For example:


[https://example.com/some/really/long/path?campaign=spring2026](https://example.com/some/really/long/path?campaign=spring2026)

↓

[https://nly.kr/abc123](https://nly.kr/abc123)

Enter fullscreen mode Exit fullscreen mode

When someone opens the short URL, the service looks up the identifier and redirects the visitor to the original URL.

The basic flow looks like this:


User creates short URL

Enter fullscreen mode Exit fullscreen mode
Enter fullscreen mode Exit fullscreen mode

Generate unique short code

Enter fullscreen mode Exit fullscreen mode
Enter fullscreen mode Exit fullscreen mode

Store original URL + short code

Enter fullscreen mode Exit fullscreen mode
Enter fullscreen mode Exit fullscreen mode

Redirect visitors using the short code

Enter fullscreen mode Exit fullscreen mode

This looks simple, but a production URL shortener requires more than just redirecting links.


Adding click analytics

A useful short link should provide information about how it is being used.

For each visit, useful data can include:

  • Timestamp
  • Referrer
  • Device type
  • Browser
  • Operating system
  • Location information

For example:


Short URL:
[https://nly.kr/abc123](https://nly.kr/abc123)

Clicks:
1,245

Top referrer:
Google

Top device:
Mobile

Enter fullscreen mode Exit fullscreen mode

Analytics help users understand where their visitors are coming from and which links perform better.

A short URL is not only about making a link shorter.

It can also become a simple link management tool.


Creating QR codes from short URLs

Short URLs are often used in offline environments.

Examples:

  • Business cards
  • Posters
  • Product packaging
  • Events
  • Printed materials

A QR code created from a long URL can become difficult to manage.

Instead, users can create a QR code from a clean short URL:


[https://nly.kr/abc123](https://nly.kr/abc123)

Enter fullscreen mode Exit fullscreen mode

This makes printed links easier to update and manage.


Supporting custom short domains

Many businesses want their links to use their own domain.

For example:


brand.com/product

Enter fullscreen mode Exit fullscreen mode

instead of:


random-short-domain.com/abc123

Enter fullscreen mode Exit fullscreen mode

A custom short domain provides:

  • Better brand recognition
  • More trust
  • Consistent link identity

For marketing campaigns, branded short links can be more effective than generic URLs.


Building a URL Shortener API

A URL shortener becomes much more useful when developers can integrate it into their own applications.

Common use cases:

  • Automatically creating short links
  • Generating campaign URLs
  • Adding short links to dashboards
  • Managing links from applications

A simple API workflow looks like:


Application

↓

URL Shortener API

↓

Create short URL

↓

Return generated link

Enter fullscreen mode Exit fullscreen mode

This allows developers to use URL shortening as part of their own products and workflows.


Why I built NLY URL Shortener

The goal was not simply to create another redirect service.

I wanted to build a practical link management tool that combines:

  • Short URL generation
  • Click analytics
  • QR code generation
  • Custom short domains
  • Developer API access

A short link should be easy to create, easy to share, and useful after it has been created.

You can try NLY URL Shortener here:

https://nly.kr/create-short-url

API documentation:

https://nly.kr/api

I will continue sharing more technical details about building URL tools, APIs, and web utilities.

추가로 DEV.to 기준으로는 마지막에 Tags 넣으세요.

추천:



#webdev
#javascript
#api
#opensource
#productivity
Enter fullscreen mode Exit fullscreen mode

Top comments (0)