Build Your Own Url Shortener For Free!

by Jason

URL shorteners are awesome.  The less characters, the better!  But what happens when that server goes down or some network issue prevents people from getting to your links?

Nothing.  Blank pages.

Better yet, why would you want to brand someone elses domain name?  Think about all the traffic and notoriety you’re giving tinyurl and is.gd?  Can you use that same traffic to your advantage?

I have a solution.  Build your own!  In fact, check out mine at j.dro.hn!  The software I used was Kissabe, an open source script hosted at Google Code.

The install is really pretty simple.

  1. Get yourself a domain name from Godaddy and web hosting through HostGator.  Both are solid companies.
  2. Upload all of the files to where you want it installed (e.g. the root of your domain name).
  3. Create a new MySQL database called “kissa”
  4. Import kissa.sql to your kissa database using the command line or phpMyAdmin (don’t use kissa_v1.sql)
  5. Edit config.php and change the MySQL string with your database username and password. Make sure the path
    to your database is correct (if it’s not localhost).
  6. Then edit create.php at line 30 or where is says
    $short_url = “http://kissa.be/$code”;
    to read
    $short_url = “http://yourdomian.com/$code”;
  7. Then rename htaccess.example to just .htaccess
  8. Start shortening!

Let me know what you think!

{ 12 comments }

Dian R May 6, 2009 at 2:08 am

Unlike forums, with URL shorteners a script is not enough. It is the domain that's important. How can you beat the length of service like http://z.pe

jasondrohn May 6, 2009 at 2:30 pm

Very nice! You're right, the domain is important. z.pe is by far the shortest out there!

Marissa May 12, 2009 at 2:52 pm

Awesome for branding – can this be used to make the URL customizable?

ie. yourdomain.com/LinkName instead of just a random code

jasondrohn May 13, 2009 at 2:48 pm

This particular service doesn't allow you to make a LinkName – but there might be others out there. If the LinkName is important to me, I'll use Wordpress's GoCodes plugin..

Dee May 16, 2009 at 2:54 am

what folders do u upload? everything in the archive or only kissabe?

jasondrohn May 16, 2009 at 2:45 pm

If I remember correctly, it's the kissable folder. I'm not in front of a computer or I'd check for ya.

Matt May 30, 2009 at 2:37 pm

I'd also recommend checking out the urlShort project at http://urlshort.sf.net, we're working to offer another open source url shortener similar to Kissabe. It currently has an API, support for custom urls, and bookmarklet/extension/ubiquity script that will be done and released soon. Kissabe and urlShort are however quite different, since urlShort is built to be used with URLs, rather than any content.

Disclaimer: I am the project manager for urlShort.

kalyani June 8, 2009 at 2:18 pm

I have plenty of creative thoughts and high ideas for all category people to make living easy. Is there any website which I can use to reach people?

Misha Jones June 19, 2009 at 2:51 pm

I think http://ohurl.com uses a form of this. Ohurl.com is my personal favorite.

PLEASE HELP July 7, 2009 at 2:47 pm

I did everything u said but when i enable the .htaccess it says HTTP ERROR 404 PAGE NOT FOUND.
So im not using that buy the major problem is this error:

Fatal error: Call to a member function GetOne() on a non-object in /home/a8839175/public_html/functions.php on line 127

PLEASE SOME HELP!

romeo971987 July 19, 2009 at 2:50 pm

Use this widget…
and integrate in your website

http://www.voizle.com

and have a look on my website please…
http://www.crazyfriendz.com a new social networking site…

Lust January 27, 2010 at 2:02 am

What do you mean by command line? Please explain how to actually do that. Importing any database .sql file always has errors no matter the version I try.

{ 4 trackbacks }

Previous post:

Next post: