How To Create Your Own Custom URL Shortener For Free
In the age of social media, link shortening services have become ubiquitous. But many brands have grown tired of sharing the same old Bit.ly and TinyURL links, instead opting to use their own branded shortlinks.
Branded shortlinks not only take up less space—they also look neater and more professional.
Bit.ly and other platforms offer this as a service, but they typically charge a pretty penny to do so. In this post, we’ll take a look at how you can start operating your own branded URL shortener absolutely free.
Ready? Let’s dive in.
Get A Short Domain
The first step to setting up a custom URL shortener, of course, is to get your hands on a short domain name.
Remember: it needs to be short, or it defeats the purpose—but it should also reflect your brand. Check out these examples:
- VentureBreak uses vbreak.co
- The New York Times uses nyti.ms
- TechCrunch uses tcrn.ch
- The Next Web uses tnw.to
If you get stuck, I highly recommend using Domainr to help you find the perfect domain hack.
Install Your Own URL Shortener (YOURLS)
Once you’ve got yourself a nice, short domain name, you’ll want to install YOURLS (Your Own URL Shortener). It’s a nifty set of PHP scripts that do everything you want your URL shortener to do. Just follow these steps:
- Download and unzip the YOURLS installation package here.
user/config.phpin a text editor and fill in the required information.
- Upload the files to the root folder of your new domain.
- Create a new database, making sure to match the credentials you added to
- At this point, you should be able to see the admin panel at
Note: some web hosts offer a one-click install option for YOURLS, so you may want to use that method instead.
Congrats! You’ve installed YOURLS on your server, and your URL shortener is ready to go.
Using Your URL Shortener
So, you’ve got your shiny new URL shortener up and running—but what can you do with it?
Of course you can generate short links manually at
yourdomain.com/admin at any time, but YOURLS can do a lot more.
Using The API
If you’re savvy and so-inclined, you can utilize the YOURLS API to automate some off-site tasks. Check out the documentation here, and grab your unique token from
If you’re publishing with WordPress, you may want to give the Better YOURLS plugin a try. It automatically generates a shortlink for each new published post, and it replaces the default
wp_shortlink shortlinks with YOURLS links, making it easy to use them on your site.
A number of social sharing plugins also offer built-in support for YOURLS. If you’re using a plugin that supports
wp_shortlink but not YOURLS, you can solve that problem with the Better YOURLS plugin as well.
YOURLS offers some handy bookmarklets that make it easy to generate shortlinks and share them. Head over to
yourdomain.com/admin/tools.php and drag them to your toolbar—then just click them when you need them.
If you have any questions, problems, or suggestions, feel free to share them in the comments below!