You will have seen branded urls: ow.ly, bit.ly, Goo.gl, Tinyurl, ift.tt and lots of others. URL Shorteners that transform long, unwieldy, spammy-looking web page addresses into smaller and more social media friendly links.
As well as making the links shorter, a link shortening service can be used to understand the number of clicks that your links receive – particularly if you are curating content and so pointing your readers to content that is not on your website that cannot be assessed with site based analytics.
However, using a commercial link shortening service like the ones above, is an advertisement for the link shortening service. So, if you are going to the effort of producing or curating content to share, why would you want to give someone else some of the attention?
What Is a Branded URL?
This is why some people and organisations have their own link shortener, which is known as a Branded URL or Vanity URL. A branded URL is a link shortening domain name, created to brand a certain website, product, person, etc. The New York Times uses nyti.ms, the Huffington Post uses huff.to, Pepsi uses pep.si, Spotify uses spoti.fi and there are many other examples.
You can also have a branded URL of your own to promote you, your business or whatever you like – it isn’t free, but is can be relatively inexpensive if you know how. When you finish this tutorial and learn how to set up your own custom short URL, you’ll be a big player alongside The New York Times and The Huffington Post.
What You’ll Need
- Ideas for your branded URL
- A budget to pay for your new domain
- Either a free bitly account or
- Hosting and a little technical perseverance
Choosing a Good URL
This is the most time-consuming step of the entire process. It takes a little creativity to come up with a good branded URL for your own use, but it’s well worth it in the long run. The easiest way to do it is with Domai.nr, which is a website that is set up to make suggestions of urls and tells you if they are available.
Type in the word you want to include in your short branded URL and Domai.nr will come up with different ways to put it together with a variety of extensions. It also shows you which options are available for purchase.
Things that you should consider:
- Use alternate extensions – two-letter country-specific extensions are really helpful here: it for Italy, be for Belgium and us for America for example.
- Alternative Company names – using your site name or company name isn’t essential, think about product names, personal name or your niche. For example, Netflix at one time used movi.es.
- Use initials – careful with this one! The initials must be linked to your brand in the customer’s mind, or the url won’t be easily linked to your brand by your customer.
- Remove vowels – make sure the brand name is still recognizable though. Good example: Nissan – nssn.co
- Abbreviate – use common abbreviations to make things shorter. For example, “2” can be used instead of “to”.
- Use subdomains – sometimes you just can’t get the domain you need, so get the last part and add the beginning with a subdomain. Sugarscape uses on.sugarsca.pe and I use ra.ckham.uk.
Important: Your URL will need to be fewer than 15 characters in order to work with Bitly.
Once you’ve found your future branded URL, buy it using any domain registration site. Remember, using a branded URL is a commitment to keep it for as long as you keep your business (if you ever drop it, all your shortened links will be broken), so consider the cost of carrying it year after year. So take your time, make it good, and stick with it.
Choose your own hosting or use Bitly
Using Bitly is technically easier, but comes with some significant restrictions. Firstly, the control of your shortening service is given over entirely to Bitly, meaning that you are reliant on the service that Bitly offers and can change. So they maintain your links, provide the service, give you the links and so on. Secondly, the service itself is limited – you can only shorten 500 links with your branded url in a month. If you want more than that, you are looking at an undisclosed fee that is rumoured to be between $600 and $1000 per month!
Personally, I would rather use my own hosting – the issues are technical, but if you can install WordPress, you can install your own domain shortening service.
If you don’t already have a Bitly account, create one for free here. Once you have an account:
- Click on the short menu link in the top right of the screen
- On the drop down menu select “Advanced Settings”
- Enter your short domain and (and this is important) enter your main domain into the redirect url box, so that if someone enters just your short domain with no following characters, the link goes to your account and not straight to Bitly.
- Then change your DNS: the Domain Name System (DNS) is what allows a web browser to match a domain name to the actual website associated with it. You need to tell DNS that your short branded domain should now point to Bitly.
The way you update DNS varies depending on your domain registrar, but in general, the process goes something like this:
- Log into your domain registrar’s website.
- Select the domain you want to modify.
- Find the section for managing DNS entries. The name of this section varies, but is usually something like “DNS Configuration,” “DNS Records”, “Advanced DNS,” “Total DNS”, “Host records,” or similar.
- Edit the existing A record for your site and change the IP address to 22.214.171.124
If there is no existing A record (which is unusual), add a new one. The A record’s “host name” should be either the character @ or your base domain (both mean the same thing). You should only have one A Record. If you have more than one, remove all others and leave only the one pointing to Bitly IP.
It can take up to 48 hours for domain changes to propagate through the DNS system. You’ll know the DNS has been set up correctly when you can default your short domain in your bitly settings under ‘advanced’.
Creating your own hosted URL shortener
You can create your own system if you are a bit of a programmer. However, there is a free system out there called YOURLS (Your Own URL Shortener). It’s a free PHP script created by Lester Chan and Ozh Richard that is:
- Easy to install – If you’ve got no problem installing WordPress, then setting YOURLS is a piece of cake.
- Customizable links – You can customize the links instead of the random characters that make no sense.
- Statistics – An admin page that allows you to manage and keep track of details like date of creation, IP, clicks, etc.
- Public/Private links– You control whether this service is available for public to use or yourself only.
- Bookmarklet – Easy bookmarklet to create your own short URL on the fly.
- YOURLS also comes with a WordPress plugin.
Creating the MySQL Database
Firstly, create a database for the application.
- Log into your account’s cPanel.
- Under a header similar to “Databases”, click on “My SQL Databases”
- Enter the desired name for the database in the New Database field and click on the Create Database button.
- A confirmation screen will be displayed, informing that the database has been successfully created.
- Click on the Go Back button to return to the database management screen and enter a new user name and password.
- Click Submit to save your MySQL username.
- You will be redirected to a screen where you will be prompted to choose the desired privileges. Select “All Privileges” and click on the Make Changes button.
- Download the zip file from https://yourls.org/
- Copy the YOURLS zip file into the root directory of your hosting for the domain you intend to use, and unzip the file.
- In the user subdirectory copy user/config-sample.php to user/config.php
- Open user/config.php with a raw text editor (like Notepad) and fill in the required settings with the information you used when you created your database:
- YOURLS_DB_USER: Your database username which we had just created
- YOURLS_DB_PASS: Password for your database
- YOURLS_DB_NAME: Your database name
- YOURLS_SITE: Your short URL which you had purchased (make sure you leave off trailing slash)
- username and password: whatever username and password you want to keep for admin
- Once all files are uploaded open your web browser and type yoururl.com/admin/install.php
Now once you had installed YOURLS its time to navigate yoururl.com/admin and login with your credentials and from here you can generate short URL for yourself.
Redirect Short URL to Main Domain
If anyone types in your short url you will want them to be redirected to your main domain. There are many ways to do this, but the easiest is not to change the htaccess file (which is recommended in many places) but to create a file in the root directory of your domain called “index.php”. The content of the “index.php” file should be:
<?php header('Location:http://yoururl.com/'); ?>
(Obviously replace yoururl.com with your own main url name).
Integrate with WordPress
Now we have running short URL domain, at last we just need to integrate it with our exiting WordPress blog, for this you just simply need to download and install WordPress Plugin and then in setting give your credentials.
That’s it, now over a time this plugin will grab all blog post and generate there short URLs automatically.