Hosting Tutorial & Guide

How to Create Short URLs for Your Website

updated on Jun 22, 2016
How to Create Short URLs for Your Website Nowadays, short URLs are widely used for Internet marketing, especially the content marketing on social media like Twitter.

If you have shared blog posts to Twitter for social media marketing purpose, you may have noticed that the URLs of some posts are too long to be properly shown in Twitter updates. This is quite common when you use long tail keywords for SEO.

URL shorteners, then, are the right solution that enables you to create short URLs for better marketing. If you want to get more information before trying short URLs, read the tutorial below and learn how to make short URLs properly.

Why Use Short URLs?

Short URLs have been used for a couple of years. The most common use is when people want to share long URLs somewhere with character limits, while they are also used for some other purposes like brand building.

Let's see an example. When HostGator, one of the largest hosting providers in the US, releases a promotion, it creates a promo page with the following URL.

HostGator Promotion Page

This link is not too long, but when tracking is enabled, it becomes more complex.

URL with Tracking Parameter

In this case, HostGator uses a custom short URL instead of the complex link (with tracking enabled) when sharing the promotion page on Twitter. The new link looks clean yet professional, right?

Short URL Shared on Twitter

This example shows a common purpose of using short URLs – to share content on social media in an easier and much more elegant way. Some other reasons are revealed in below.
  • Since tracking is usually enabled by default, short URLs are effective in evaluating and adjusting marketing strategies.
  • Short URLs can help to disguise your affiliate links.
  • Short URLs with a custom domain help you build brands, especially when you want to establish a personal brand.

Popular Online URL Shorteners

There are several different ways for creating short URLs, among which the simplest one is to use a free online URL shortener that offers the necessary shortening and analytics features. With such a service, your domain is replaced by the domain provided by the URL shortener, and the permalinks of posts are replaced by strings of letters and numbers, for example, "j8dpsl2".

If you don't want to spend a penny and don't need many customization options, you can simply generate short URLs with these simple-to-use shorteners. is one of the most popular online URL shorteners. After going to the official site, you only need to paste the link of a post in the blank field and click on the "Shorten" button, and a short URL comes into use. URL Shortener

If you want to keep control of all your short URLs and get reports for the clicks, you will need to create a free account with After signing in, you are able to edit the post title and some other details, and share short URLs to Twitter and Facebook easily. The free account includes 5,000 short URLs. is a URL shortener offered by Google. Just like, allows you to shorten URLs with or without signing in. However, you can get the tracking feature only when you log in with an account. For signed-in users, a unique short URL is created for each long URL, and it will not expire unless there is a spam or legal issue. URL Shortener

Besides these two services, you can also try some other commonly used URL shorteners like and TinyURL for the shortening. These services all work in a similar way and provide proper tracking of the clicks.

Creating short URLs for free is good. However, if you want to raise the brand awareness by using a custom domain, you need to do some more works.

Create Short URLs with a Custom Domain

It's obvious that short URLs starting with, or don't look professional enough because they cannot reflect either your business name or your personal brand. If you are looking for a way to brand your short URLs, and YOURLS can help. Which tool to use depends on your preference.

Purchase a short domain

In the case that you are using a long domain which consists of 6 letters or more, we'd suggest you buy a shorter domain first and then configure it with or YOURLS.

To select a good short domain, you can visit to make a search. Remember to use the important letters in your name or your business name only, and then find a short TLD. It's possible that your ideal short domain is already taken, so you need to invest some time in finding the best one that is still available.

Search Short Domain

After finding the proper domain, go to a reliable domain registrar and purchase it as soon as possible.

Add the custom domain to supports branded short URLs and allows you to create up to 500 for free. So after getting your branded short domain, you can log into and add the domain to your account. This can be done in the advanced settings which need to be accessed by clicking on the menu icon on the upper right of the dashboard and then expanding "Settings".

Add Custom Domain to

Before verifying the domain, you have to do one more thing – to change the DNS records of the short domain. The domain should point to the IP of which is shown in the screenshot above.

Note that the DNS change may take some time to take effect, so you need to wait before the verification succeeds. After the verification, you will be able to select your custom domain when creating short URLs.

If you'd like to create custom short URLs and manage the statistics from WordPress dashboard, you can use a plugin named WP Bitly. With this plugin, you are able to automate the short link generation for all posts, pages, or both.

WP Bitly

Use the custom domain with YOURLS

Unlike, YOURLS is not an online URL shortener which you can use without any configuration. Instead, it is a project that enables you to create a private URL shortener based on your custom short domain. Setting up YOURLS is definitely more complex and time-consuming compared with, but there are some good reasons to use this project.
  • You get complete control over all your link data and do not share anything with others. The ability of being private is weaker with
  • You are able to change the destination of existing short URLs, which means if you have made a mistake when creating a short URL, you can correct it without any difficult.
  • YOURLS provides detailed traffic statistics with traffic sources, locations, and shares.
Although YOURLS is a more advanced solution that requires some technical knowledge during setup, it is worth a try if you want the privacy and the great features in it.

To make use of YOURLS, you still need to get a short domain ready at first. Also, you have to create a new MySQL database since you will need it. When these are done, go to this page and download the latest version of YOURLS from GitHub.

Download YOURLS

Extract the zip file on your local computer, and then find the config-example.php file in the "users" folder. For this file, you need to rename it to config.php, and change the database information, installation site (the short domain), URL shortening settings and more by following the official configuration guide. In fact, almost all settings in the file are self-explanatory so the configurations would not be too hard.

Configure YOURLS

Next, access the root directory of the short domain through FTP or a file manager and upload YOURLS. Then, enter in the address bar of a web browser. If everything is right, you will now get a success message, and you can start creating short URLs with your private URL shortener.

For the generation of short URLs, you can either leave it to be done by YOURLS automatically, or use your own words instead of strings of letters and numbers.

Create Short URLs with YOURLS

For better integration of YOURLS and WordPress sites, you can install the YOURLS Link Creator plugin to automate the short URL generation when posts are saved, scheduled or published.

Since YOURLS offers statistics, you can also check various traffic data for your short URLs easily at any time.

View Stats in YOURLS