Here I will show you how to install the YOURLS link shortener on a custom domain name using Softaculous in your shared hosting account cPanel.
YOURLS (short for Your Own URL Shortener) is a free, open-source and self hosted URL shortener alternative to bit.ly, goo.gl or is.gd.
Want to see the link shortener action? http://wshr.site/yourls is a shortened URL I created using YOURLS that redirects to this blog post.
Bit.ly or Goo.gl are really good link shortening services but maybe you want to create your own branded shortened links using a 100% free, open source, self-hosted and flexible URL shortening application.
In this tutorial, I will show you how to install YOURLS using a custom domain name on Softaculous (for installation on Ubuntu or CentOS checkout the guides here).
I will assume that you already have registered a custom domain name and that you set it up on your web host.
Installing YOURLS using Softaculous and start shortening URLs shouldn’t take you more than a couple of minutes to do.
1. Login to your web host’s cPanel (I’m using SiteGround)
First you need to login to your web hosting control panel (cPanel) and click on the Softaculous icon or button. I’m using SiteGround as it’s the web host I use and recommend (read my SiteGround review).
YOURLS can be installed on most shared web hosts like InMotion Hosting or Bluehost and you will find it in the 1-click installation scripts (such as Softaculous, Installatron or Fantastico Deluxe) in the cPanel of your hosting account.
(FYI check out my SiteGround vs Bluehost comparison if you are interested to know how these two web hosts stack up against each other)
2. Access Softaculous (or Installatron or Fantastico Deluxe)
Next locate the search box and search for the YOURLS URL shortening application.
3. Install YOURLS on Softaculous
Then click on the install link.
4. Configure the YOURLS settings
Finally you need to configure the YOURLS setup settings.
- Choose protocol: I recommend using non-WWW (i.e. http:// or https:// only) as this will shorten the URL further
- Choose domain: Choose the domain to install YOURL on (e.g. I have wshr.site)
- In directory: Leave this blank
- Site name: Choose a name for the YOURLS site name
- Admin username: Choose a hard to guess username
- Admin password: Choose an even harder to guess password
- First name: Your first name
- Last name: Your last name
- Admin email: your email address
- Install: Click the install button and YOURLS will be installed
Click the install button and YOURLS will be installed using Softaculous. Once it’s installed you will be give the username and password to your YOURLS dashboard / admin area.
That’s it, you’re all done!
To wrap things up, here below I have summarized the server requirements and noted down some of the pros and cons of YOURLS.
YOURLS server requirements
- Server must have mod_rewrite enabled
- Server must support at least PHP 5.3 and MYSQL 5
- Must have its own .htaccess file (i.e. you can’t install YOURLS in the same directory as for example WordPress)
YOURLS pros and cons
- It’s 100% free
- It’s open source (unlike bit.ly)
- It’s self-hosted (you OWN it unlike bit.ly)
- It’s flexible
- You can use any domain that you own
- You can change the URL destinations later (unlike bit.ly)
- Huge range of free plugins (unlike bit.ly)
- Plugins that let’s you choose from a range of redirect types (e.g. 301, 302, meta redirect)
- Plugin that sets a fallback URL
- Plugin that makes URLs case insensitive
- Plugin that forces lowercase
- Plugin that adds Google Analytics link tagging
- Plugin that hides the referrer or take you to an anonymizer service
- Plus loads more plugins that extend YOURLS
- You can import and export URLs (unlike bit.ly)
- You can add users (unlike bit.ly)
- It can be somewhat challenging to manually install
- No comprehensive backups are available (import/export or database export are your only options)
- The design is basic (compared to bit.ly)
Written by Lisa and .