Open-source PHP and SQLite link shortener

Self-hosted URL shortener for your own domain.

MyShort helps makers, agencies, and website owners create branded short links, QR codes, protected redirects, and click analytics without paying for a hosted link shortener.

MIT License PHP 8.0+ SQLite database No Composer
yourdomain.com/admin
https://example.com/very/long/campaign-url
Shorten
1,248Total clicks
892Unique visitors
37Referrers
Product Preview

A cleaner self hosted link shortener.

Create, manage, and analyze short links from one simple dashboard.

MyShort self hosted link shortener create link screen Click to enlarge
01

Create links

Custom slug, password, OG preview, expiry date.

MyShort self hosted link shortener manage links dashboard Click to enlarge
02

Manage links

Search, copy, edit, delete, and stay organized.

MyShort self hosted link shortener analytics screen Click to enlarge
03

Track clicks

Visitors, referrers, devices, and daily trends.

Why self-host

Stop renting your links from someone else.

Hosted shortener tools are convenient until the limits, branding, pricing, and data ownership get in your way. MyShort gives you a simple URL shortener that runs on infrastructure you already control.

💸

No monthly shortener bill

Run your own short links instead of paying every month for basic redirects, branded URLs, and QR codes.

🧭

Your domain, your brand

Use short links like yourdomain.com/sale2024 or point a subdomain such as s.yourdomain.com to MyShort.

🧱

No heavy stack required

No framework, no Composer, no database server. Upload a few files, configure your domain, and start shortening links.

Features

Everything a practical self-hosted URL shortener needs.

MyShort focuses on the features you need to share, protect, measure, and manage links without turning a tiny tool into a complicated platform.

🔗

Custom slugs

Create memorable vanity URLs for launches, ads, clients, landing pages, and internal resources.

🔒

Password protection

Lock sensitive links behind a password when you need to share something without making it fully public.

📊

Click analytics

Track total clicks, unique visitors, referrers, and daily trends directly from the admin dashboard.

🖼️

OG thumbnails

Set custom title, description, and image previews for better sharing on social platforms and messaging apps.

📱

QR codes

Generate a QR code for every short link and download it in one click for posters, packaging, and offline campaigns.

🕐

Expiring links

Set an expiry date for temporary campaigns, private resources, limited-time offers, or one-off client links.

Install

Drop it on shared hosting and go live.

MyShort is built for straightforward deployment. If your hosting supports PHP 8.0+, SQLite3, and URL rewriting, you have everything you need.

Clone or download the repository

Get the source code from GitHub and prepare it for your hosting folder or subdomain.

Update the config

Set your base URL, admin username, and admin password in the configuration section.

Upload the files

Copy index.php, r.php, and .htaccess into your hosting root or a dedicated short-link subdomain folder.

Open your domain

The SQLite database is created automatically on first run, so you can start creating short links from the admin panel.

# 1. Clone the repository
git clone https://github.com/dxhuong/myshort.git
cd myshort

# 2. Configure index.php
define('BASE_URL', 'https://yourdomain.com');
define('ADMIN_USER', 'admin');
define('ADMIN_PASS', 'your_password');

# 3. Upload to your server
index.php
r.php
.htaccess

# 4. Visit your domain
https://yourdomain.com
Use cases

Built for people who want small tools that just run.

MyShort is a good fit when you want a branded link shortener without introducing a full SaaS dependency into a simple workflow.

🚀

Indie makers

Share product launches, waitlists, changelogs, and campaign pages through links you fully control.

🏢

Agencies

Create clean client campaign URLs, track performance, and generate QR codes for offline materials.

🛠️

Small teams

Keep internal resources, partner links, private downloads, and temporary redirects organized in one dashboard.

Pricing

Open-source and free to use.

MyShort is released under the MIT License. Use it, modify it, and deploy it for your own projects, client sites, or internal tools.

$0

Self-hosted forever

  • Custom short links
  • Password protection
  • Analytics dashboard
  • QR code generation
  • OG preview metadata
  • Expiring links
FAQ

Questions about MyShort.

Here are the common things people check before deploying a self-hosted URL shortener on their own domain.

What is a self-hosted URL shortener?

A self-hosted URL shortener runs on your own server or hosting account, so you control the domain, data, redirects, and deployment.

Does MyShort need a database server?

No. MyShort uses SQLite, so there is no MySQL or PostgreSQL server to configure.

Can I install it on shared hosting?

Yes. MyShort is designed for PHP 8.0+, SQLite3, and Apache with mod_rewrite enabled. You can also adapt the rewrite rules for Nginx.

Can I use my own domain?

Yes. You can install it at your root domain or use a short subdomain like s.yourdomain.com or link.yourdomain.com.

Is MyShort good for private links?

Yes. You can protect a short link with a password and set expiry dates for temporary access.

Is it suitable for large enterprise analytics?

MyShort is intentionally lightweight. It is best for makers, small teams, agencies, and site owners who want practical link analytics without a heavy platform.

Launch your own self-hosted URL shortener today.

Get branded short links, QR codes, protected redirects, OG previews, and analytics in a tiny PHP and SQLite app you can run on your own hosting.