TinyURL, of course, was one of the pioneers in the field but ever since Micro blogging sites like Twitter started to take off, a number of services have come up that all provide essentially the same URL shortening service. One major problem with using a third-party URL shortening service is that all your links are always bound to that one service and if they ever go out of business, like tr.im did, all your data is gone too. And that is why, if you’re serious about saving all the wonderful links that you’ve discovered from around the web, you might want to consider running your own URL shortening service. YOURLS gives you exactly that.
Installation
First of all, you need to download YOURLS to your web server and unzip the package.
Now, use your favorite tool to create a mysql database for YOURLS. If you’re using a shared hosting provider, there must be a way to do this from inside your domain control panel. If not, just open a ticket with your hosting provider and let them handle it for you. I named my database ‘kunz_yourls‘. Now, browse over to the includes directory and rename the file named ‘config-sample.php’ to ‘config.php’. Open ‘config.php’ in a text editor and edit the following variables. ‘YOURLS_DB_USER’ YOURLS_DB_PASS YOURLS_DB_NAME YOURLS_DB_HOST YOURLS_SITE $yourls_user_passwords The comments in the file are pretty self explanatory and you can also get an overview here.
Now, from your web browser, visit the site http://
Start creating your own Short URLs
Browse over to http://
You can even get some nice and simple statistics about the short URLs that you’ve created.
YOURLS also provides an API that you can take advantage of in custom applications and such. Did you find YOURLS useful? Will you use it over, say, bit.ly? Let us know in the comments.