How To Create Branded Short-URLs
By Jonathan on March 25th, 2010 in Tips & Tutorials, Webmaster
One of the great drawbacks of Twitter’s 140 character limit is that most URLs need to be shortened before they are practical for use on the service. There are dozens of URL shorteners available; they range from general tools, like bit.ly to ones tied to social networks, such as Digg’s.
But, although these services are very useful, they do have their limitations. For one, it is difficult to build a brand using a third party shortener because your URLs end up looking like everyone else’s, including competitors and spammers. To make matters worse, if something happens to the shortener company, those URLs could break.
Fortunately, there is a way around this. As long as you have a reasonably short domain name, you can host your own URL shortening service for free and without too much effort. All you need is a little time and a copy of YOURLS to make it happen.
How To Do It
YOURLS is a self-hosted URL shortener. This means that your server is providing the same service as, for example, Bit.ly.
You install it as you would just about any other PHP script, by uploading it to your server, creating a database for it, setting up the config file and then pointing your browser to the administration page.
Once it’s running, you only have a few options to worry about, most of which are set in the configuration file. The biggest choice is to either have it be a public or private service. However, bear in mind, that a public service will likely be abused by spammers so, unless you plan on dedicating a lot of time to monitoring the service, it is better to set it to private.
From there, the URL shortening experience is pretty much the same as it is with any other service. You install a bookmarklet to your browser and click it whenever you want to generate a shortened URL. The only difference is that, instead of it being on a third-party domain, it is now on your own.
YOURLS also tracks statistics for each URL including the number of clicks it receives. As you can see, this information is presented in a very professional manner, complete with charts and graphs as necessary. You can also instruct the service to only create one short URL per long one to avoid splitting traffic across many versions of the same link.
Best of all, YOURLS can actually generate shorter URLs than many of the major services because it will have fewer items in its database than those getting many thousands of submissions per day from the public. This means it needs fewer digits to identify each URL it refers to.
However, this doesn’t mean it’s a perfect tool for every Webmaster, there are several caveats you should note before downloading and installing.
Caveats and Notices
Before you jump into installing YOURLS, there are two things that you need to be aware of:
- YOURLS works best on any domain name that is very short. I currently use it on my business site’s domain, copybyte.com. Though only eight characters, it is still longer than ideal, especially with the “.com” extension. To get round this, you could register a new domain, perhaps on a less populated TLD such as “.in” or “.me”. You could easily create a domain specifically for this purpose and simply host it on your existing service.
- YOURLS cannot share a directory with another application. For example, you can’t run WordPress and YOURLS in the same folder. The reason is that YOURLS requires control over your .htaccess file. Any other application that modifies it, such as WordPress, will overwrite and break YOURLS. The solution is to put YOURLS in a different directory, ideally something short, like “/a”, and use it from there, letting it share the domain with your actual site. I do this with CopyByte, putting it in the /z directory (IE: http://copybyte.com/z/***).
Though these two hurdles might be an obstacle for some, if you can get past them it’s worth the reward of a very simple, fast and effective way to create your own URL shortener.
Other YOURLS Features
Once you have set up YOURLS there are a few more uses beyond the aforementioned bookmarklets or simply using the admin panel.
First, if you use WordPress, YOURLS offers a WordPress plugin that integrates YOURLS into your blog.
The plugin serves as a bridge between YOURLS, your blog and Twitter. It can automatically tweet out new posts with your custom short URL, embed your short URL into the body of posts for others to use and use microformats to make your short URLs machine-readable.
Second, if you are comfortable programming your own application, you can use YOURLS’ API to craft your own tools. This can include plugins for other platforms or even standalone applications.
In the end, your custom URL shortening service can be integrated just as easily as any other site’s, it is just a matter of finding or writing applications that support it.
Bottom Line
The reasons to run your own URL shortening service are plentiful. If you do decide to take the plunge, YOURLS is a solid way to go. Others prefer LESSN, another good choice, but either way the process is very similar.
The bottom line? A custom URL shortening service is a good way to help brand yourself. It won’t help much with SEO because YOURLS, as with other URL shorteners, passes the link along via a redirect so that the credit goes to the source, but the benefits of brand recognition is worth the effort.
At the very least, if you own your domain and have a reasonably powerful hosting account, there is no reason to spend your time linking and tweeting through another company’s name. Though Bit.ly and others are fine services, you most likely would rather be promoting your own name.
YOURLS lets you do that for free and with minimal headache.
Related posts:
- Descriptive URLs For SEO Many Content Management Systems (CMS), such as WordPress, create dynamically...
- Easy Custom Error Pages at DreamHost Making a custom error page with DreamHost is easy. DreamHost...
- Decompress ZIP Archives via SSH Uploading an entire site or script in a ZIP archive...
- Preventing Hotlinking via the Web Panel Hotlinking occurs when a website directly accesses, rather than links...
- Do You Make These 5 Server Security Mistakes? Web servers are a prime target for hackers, not to...
Tags: bitly • digg • lessn • twitter • url shortening • yourls

