Home > Internet Business > How To Create Your Own URL Shortener

How To Create Your Own URL Shortener

December 9th, 2009 vahn Leave a comment Go to comments

yourls logo How To Create Your Own URL Shortener

I repost this tips from my brother website. Seems there are a lot of people still confuse how to do it, i will cover it once more and modify some part of the article and explain more detail how to shorten url to our own domain name.  In the daily basis, usually we’re use URL shortener service like TinyURL, Bit.ly, su.pr, shorten.ws and many more on the internet. All of their service is really great and of course it’s free.

But, have you ever thought if you can also create your own URL shortener with your own domain name.

For example, if you want to promote an affiliate link, which one of these URL below is looking better :

This one : http://tinyurl.com/634em/

Or this one : http://yourdomain.com/clickbankmaestro/

If your answer is the second choice, I will show it to you how to create your own URL shortener for Free on your own domain name.

YOURLS (Your Own URL Shortener) is what we’re talking about. It’s a free PHP script developed by Lester Chan and Ozh Richard that allow you to create something similar with TinyURL or Bit.ly. I am already installed in my host and played around with it for a while, and here is my opinion :

1. Installed this script is easy, especially if you’ve got no problem installing WordPress, then setting this script is not a hard task. (I am also provide the step-by-step tutorial how to install this script)

2. You can make your own customizable links instead of using the random characters that make no sense.

3. Details Statistics of your URL is allows you to manage and keep track of details like date of creation, IP, number of hits and clicks, etc.

4. You can make your own Public/Private links and control whether this service is available for public to use or yourself only.

5. Bookmarklet – Easy bookmarklet to create your own short URL on the fly.

Well, enough for all the positive feedback. I am sure you’re will be interested to use this URL shortener script in your own domain name.

let’s Begin :

1. Configure The Database

  1. Enter your website configuration panel. If your web hosting account provide you with cPanel, login at http://www.yourdomainname.com/cpanel
  2. Find “MySQL Database” under Databases column.

    database How To Create Your Own URL Shortener

  3. Create a database with the name you desired. Click Create Database dbase 1
  4. After database created, go down of the page and create new user for the databases. Fill Username and Passwo rd and Click Create User
    dbase 2
  5. After that, link your username and password to your database at below section. Click Add dbase 3

2. Download YOURLS

Download the latest version of YOURLS, and then Unzip the file and prepare your favorite text editor. We are about to do some configurations.

3. Setting your YOURLS config files

  1. Look for includes/config-sample.php, rename it to includes/config.php and open up in your text editor.
  2. You’ll need to change and input your the details of your database. Change only YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_SITE and Username(s) and password(s) allowed to access the site
    example :
    /** MySQL database username */
    define(‘YOURLS_DB_USER’, ‘yourhostusername_vendy’);

    /** MySQL database password */
    define(‘YOURLS_DB_PASS’, ‘rahasia’);

    /** The name of the database for YOURLS */
    define(‘YOURLS_DB_NAME’, ‘yourhostusername_vendyyourls’);

    /** YOURLS installation URL, no trailing slash */
    define(‘YOURLS_SITE’, ‘http://vendyxiao.com/yourlsfolder’); //

    /**  Username(s) and password(s) allowed to access the site */
    $yourls_user_passwords = array(
    ‘vendy’ => ‘rahasia’);

3. Upload The Files

Upload all files and folders in the exact same structure to the root folder of your web hosting account. Your root folder name might varies from public_html, www, html, etc.

upload How To Create Your Own URL Shortener

4. Install

Almost done now. Fire up your browser, type in your domain name as url, follow by /admin/install.php. For example: http://yoursite.com/admin/install.php.

If everything is setup correctly, you’ll see these following messages with the link to your admin page at the end of the line.

install success How To Create Your Own URL Shortener

5. Done

Login to your administration page, it’s located at : http://yoursite.com/yourlsfolder/admin/ and start creating your very own short URL. Well Done!

Hope it works for you, and drop me a comment if you have any questions of got any problem with the installation.

Thanks to my brothers for provide this tips at his website

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • LinkedIn
  • Add to favorites
Categories: Internet Business Tags:
  1. December 9th, 2009 at 21:16 | #1

    Interesting article, thanks for posting

  2. December 26th, 2009 at 01:01 | #2

    I want to quote your post in my blog. It can?
    And you et an account on Twitter?

  3. vahn
    December 26th, 2009 at 09:29 | #3

    themoah : yes, you can. what do you mean by twitter?

  4. February 5th, 2010 at 05:29 | #4

    hi it seems this website conceals your original referrer what do you think

  5. vahn
    February 5th, 2010 at 08:59 | #5

    what do you mean?

  6. Jojo
    May 10th, 2010 at 10:08 | #6

    Hi Vendy
    I did it, so happy.
    Thanks for your help.

    cheers, Jojo

  1. No trackbacks yet.