zithromax online

YOURLS: Your Own URL Shortener

There’s a long history of URL shortening services. I still remember the days when we had to host our websites on Geocities or Xoom. We all hated the long URLs, and so there came the redirect services by come.to, i.am, etc. After all, you wouldn’t argue that http://i.am/davidt looks a lot more elegant than http://www.geocities.com/neighborA/432499. The need for shortened URLs was largely due to the fact that badly generated URLs could not satisfy the sense of arrogance of being a webmaster.

As domain registration fee became cheaper and cheaper, a lot of people rather pay ten bucks a year to own a unique and permanent URL. Come.to and i.am eventually were forgotten.

Twitter created a whole new page to the history of shortened URLs. Within a limited amount of space, it is not possible to include a long URL. Bit.ly was an answer to this kind of needs. I don’t use bit.ly heavily as I am not a frequent twitter user. It caught my attention about URL shortner when recently I heard about ShadyURL.

My colleague, Aditya Mantrala, recently introduced me a self-hosted tool called YOURLS. It has an awesome name, and it is extremely easy to use and configure. With it, you can become another bit.ly.

YOURLS requires that your server supports PHP and MySQL. It took me less than 5 minutes to finish the download and installation process on my local server.

As I said before, it behaves like bit.ly, except that it uses your own domain name. The best features I like about YOURLS include:

  1. The easy bookmarklets that allow you to instantly shorten any URL you are current visiting.
  2. It gives you an API so that you can let the public shorten their URLs without exposing any admin secure credential.
  3. It is a great SEO tool. Having an URL that contains important keywords is one of the factors to grab the top spot in search results. With YOURLS, the URLs of your site are no longer limited to the technology behind the scene. http://www.yoursite.com/aboutus/contact/direction.jsp?city=139801&param1=12343&param2=2390jd can perhaps become http://www.yoursite.com/sanfrancisco-office-direction. And you can let the marketing people do the shortening work using the admin tool that requires little technical knowledge.
YOURLS panel

Tech geeks: the technology behind is pretty simple. Every URL from your site will be looked up against the .htaccess file. YOURLS’ PHP files will make queries to your MySQL database to see if an entry exists. If it does, the destination URL will be returned and you will be redirected.

Therefore, you need to make sure that .htaccess is enabled. Very often, Apache’s apache/conf/httpd.conf will have the line AllowOverride None, which could be changed to AllowOverride All. Another place to check is within httpd.conf, the line
LoadModule rewrite_module modules/mod_rewrite.so
needs to be uncommented.

As it checks every single URL against the .htaccess entries, my guess is that server performance will be affected. Also, if your web site has heavy traffic, stress test should be done on the server as this tool relies heavily on the MySQL database.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>