Skip to main content

Shortlink System

A comprehensive URL shortening solution with analytics and custom domain support.

Features

  • Create short URLs from long URLs
  • Custom paths (e.g., yoursite.com/my-link)
  • Preview images for social media
  • Click analytics (countries, devices, referrers)
  • Custom domain support
  • Collision detection with existing routes

Admin URL

1

Open Shortlinks

Go to /admin/shortlinks
2

Click Create

Click Create Shortlink
3

Enter URL

Paste the long destination URL
4

Choose Path

  • Auto-generate: Random short path
  • Custom: Enter your own (e.g., winter-sale)
5

Optional: Preview Image

Upload an image for social media previews
6

Create

Click Create Shortlink

Analytics

Click the analytics icon on any shortlink to view: Export analytics to CSV for further analysis.

Custom Domains

Setup Steps

1

Add Domain

Go to Domain Management → Add Domain Enter subdomain (e.g., link.yourdomain.com)
2

Configure DNS

Add these records in your DNS provider:CNAME Record:
TXT Record (for verification):
3

Verify

Wait 5-10 minutes for DNS propagation, then click Verify DNS
4

Use

Select the custom domain when creating new shortlinks

Database Schema

Collision Detection

The system automatically checks if your custom path conflicts with:
  • Existing blog posts
  • Project pages
  • Static routes
  • Other shortlinks
A warning appears if a collision is detected.

Best Practices

Use descriptive paths like winter-sale instead of random strings for better memorability.
Add preview images to increase click-through rates by 30-50% on social media.
Shortlinks are case-insensitive. My-Link and my-link are the same.