John Chow dot Com Online Investment Review - Make Money Online Investing in Businesses
 

How To Create Your Own Tiny URL

written by John Chow on July 12, 2009

How one lazy bum made $176,697.50

If you have ever clicked my “Tweet This Post!” icon at the bottom of the post, you’ll see that it will take you to Twitter so you can tell all your followers about the great post you’ve just read. Because of the 140 character limit, URLs that are longer than 30 characters are shorten with an URL shortening service like TinyURL or Bit.ly. If you look at the URL I use, you’ll see that it still has johnchow.com in it. I do this to maintain and reinforce my brand. Here’s how to create your own tiny URL for your WordPress blog.

Shortening The Default WordPress URL

We begin by shortening the WordPress URL structure. By default, WordPress names its URL as yourblog.com/?p=xxxx, with the xxxx being the post number. The default URL isn’t very Google friendly and most bloggers will turn on the SEO friendly URL instead. However, the default URL will still work even if you’ve turn on SEO friendly URL. The URL will simply forward to the SEO one.

Because it’s a lot shorter, the default WordPress URL makes a great starting point to create our own custom short URL. The first thing I did was remove the ?p= so the URL becomes johnchow.com/xxxx. You do this by adding the following code to your htaccess file.

RewriteCond %{REQUEST_URI} ^/([0-9]+)$
RewriteRule .* http://www.johnchow.com/?p=%1 [R=301,L]

Change jonchow.com to your domain and you should be good to go. I highly recommend you back up your htaccess file before editing it.

Create The Tweet This Post Link

The following code will create the Tweet This Post link you see at the bottom of my blog articles.

<a rel=”nofollow” href=”http://twitter.com/home/?status=Reading @JohnChow – <?php the_title(); ?> http://johnchow.com/<?php the_ID(); ?>”><img src=”http://www.johnchow.com/images/tweet-this.png” alt=”Tweet This” /> <strong>Tweet This Post!</strong></a>

Insert the above code (change to your domain and twitter name and upload your own bird image and link to that) into your WordPress single.php file at the point where you want the Tweet This link to show up. In my case, I have it appear at the end of the post. If you click the Tweet This Post link, it will send you to Twitter and the following tweet would be insert into your What are you doing? box.

Reading @JohnChow – How To Create Your Own Tiny URL http://johnchow.com/9894

Doing it this way allows me to bypass the use of an URL shortening service. JohnChow.com only has one more letter than TinyURL.com so this isn’t a big deal. What is a big deal is the URL has my blog domain name in it and reinforces my brand. The other advantage is I don’t have to worry about TinyURL or bit.ly going down and messing the URL up. You can save yourself a few letters by using www instead of http:// as Twitter.com will auto link the URL. However, Twitter clients like TweetDeck will not link the URL if it’s missing the http:// so I recommend you stick with that and not brother with the www.

You won’t have to worry about readers seeing the shorten URL after they get to your blog because WordPress will auto forward them to the SEO friendly URL. I added a ref=nofollow tag to ensure that no Google juice is passed to the short URL.

If you like this post, please click the Tweet This Post link and tell all your followers about it. :)

Did you enjoy this post? Get John Chow Dot Com updates via email...

Stay up to date with all of John Chow’s tips for making money online and blog posts by subscribing via email. Your email will be kept private and never shared with anyone.

{ 60 comments }

Jon July 12, 2009 at 10:10 pm

Definitely useful. Although I never really paid much attention to what the URLs actually say on Twitter, I can see where it would be helpful in not only keeping you from having to manually do the shortening but also in keeping up the “brand name.” Simple instructions, easy to follow.

Thanks for the tip :)

Jon’s last blog post: First Prize From Points2Shop

Pabz July 12, 2009 at 10:31 pm

I dont get it..

Cam Birch July 12, 2009 at 10:37 pm

I had noticed that most Tweet This post items were usually a link to some twitter service like TwitThis or TweetMeMe. This is a much better option since it goes direct to Twitter and it avoids the potential of having your account accidently hijacked because of a crappy or unsecure twittering service.

Cam Birch’s last blog post: Computer Frustrations

Don Campbell July 12, 2009 at 10:39 pm

Very cool – thanks John. I like the idea of having your own domain name in the shortened URLs.

Su.pr is supposed to allow you do this (use your own domain name in the short URL) but I haven’t got it to work yet on my Expand2Web domain. The nice thing about su.pr would be the reporting it gives you and the exposure to StumbleUpon.

Anyway, now I can try the method you’ve outlined here. Thanks!

Don Campbell’s last blog post: Add a Map to Your Website With Google Web Elements

Jon July 12, 2009 at 10:40 pm

Easier than going the route of creating your own system which is what I did to manage my own properties across the net before opening it up to others. This is what I did to get the in-depth statistics I wanted for sources and referrals with Buzvia.com.

Jon
http://Buzvia.com – Where’s Your Traffic Going?

Philip Nowak July 12, 2009 at 10:51 pm

I wish I could do this with my name or blog name. Both philipnowak.com or socialmediaunraveled.com contains way too many characters. For others, this is a great way of reinforcing your brand throughout the entire web.

Philip Nowak’s last blog post: How to Lose 10,000 Twitter Followers in 1 Day

John Chow July 12, 2009 at 11:19 pm

As long as the URL is under 30 characters, Twitter will not shorten it.

ZK @ Web Marketing Blog July 19, 2009 at 11:32 am

I usually shorten URL first and than add relevant details so that I do not have to delete again and again.

ZK @ Web Marketing Blog’s last blog post: Affiliate Theme Coupon Code – Save 15 %

Mohnish - Make Money Online July 12, 2009 at 10:56 pm

If I remember, you had posted this before? :-S

John Chow July 12, 2009 at 11:18 pm

Yes, this is an update to my tweet this post without the plugin post. I’ve mod the default URL to make it even shorter.

ZK @ Web Marketing Blog July 19, 2009 at 11:36 am

@ Mohnish

So you are keeping an eye on John Chow and closelt watching him. This is really interesting.

ZK @ Web Marketing Blog’s last blog post: Affiliate Theme Coupon Code – Save 15 %

Deneil Merritt July 12, 2009 at 10:57 pm

Awesome trick but I won’t be using it. I have the twittley plugin so my posts get voted in twittley and tweet to twitter. :)

Deneil Merritt’s last blog post: Flashback Monday – Wordpress 2.8.1, Resources, & Article Writing Case Study

Saurabh July 12, 2009 at 11:01 pm

Indeed a helpful post.
johnchow.com always helps you learn something new!

Saurabh’s last blog post: Making The Move: Do you have it in you ?

Willard "income ideas" July 12, 2009 at 11:25 pm

Thanks for the nice tricks. John Chow is really a living legend.. :)

Vladan July 12, 2009 at 11:34 pm

I was just looking for some Wordpress plugin to tweet a post when I saw the code for to create the Tweet This Post link.

Looks promissing…

Vladan’s last blog post: Like Powershell? There is a Powershell Toolbar

Zemalf July 12, 2009 at 11:52 pm

Why didn’t I think of this before! I’ve been creating some manual redirects, but I didn’t remember the default WP page thingie. Thank you very, very much for this – I’ll be going in and putting this into use right about now :)

Zemalf’s last blog post: In the Spotlight: Zemalf, a Blogger

Shanker Bakshi July 13, 2009 at 12:25 am

Great Tip, I am sure lots of people will be hotli nking to the image URL given in Tweet this post, as you advise only to change the domain name and twitter user name.

actually they also need to upload tweet bird picture on thier site and replace image URL too.

This is very simple but there are people who only do as directed and don’t put up their brain into.

Shanker Bakshi’s last blog post: Google Lifted Ban from John Chow dot Com

ZK @ Web Marketing Blog July 19, 2009 at 11:39 am

You certainly have creative mind and you show this on your blog. I think you have also won the prize for suggestions.

ZK @ Web Marketing Blog’s last blog post: Affiliate Theme Coupon Code – Save 15 %

Mahesh July 13, 2009 at 12:45 am

Thanks for this trick!

Mahesh’s last blog post: WebmastersMarketplace.com – A Real Challenger?

Joenel Umal July 13, 2009 at 1:07 am

Very good tutorial i really hate to put tinyurl domain on my twitter post ,IMO having your own domain name will make the tweet less spammy.

game-girl July 13, 2009 at 1:41 am

Thank you for drawing the reader’s attention to this trick,I absolutely share the opinion that it is very easy but no time to put brains into.

game-girl’s last blog post: Фильм City That Sailed с Уиллом Смитом?

Dean Saliba July 13, 2009 at 2:14 am

Very good advice. I quite happy to have Twitter post the default url but I know a lot of peole don’t like it.

I may post this on ym blog later on. :)

Dean Saliba’s last blog post: 8 Ways To Increase Traffic To Your Blog

Best CSS Gallery July 13, 2009 at 2:29 am

Cool, thanks for sharing

James Hartje July 13, 2009 at 2:51 am

Gets annoying I always have to go to Long Short URL

James Hartje’s last blog post: Stocks on Wall Street Additions: Personal Finance Section

Ben Pei July 13, 2009 at 3:51 am

Nice.. never have to go through all that mess again!

Ben Pei’s last blog post: Are You Getting Enough Links Yourself?

Dave July 13, 2009 at 5:41 am

If you are using wordpress, then the Pretty Link Plugin does all this and more for your blog url. I highly recommend it.

http://blairwilliams.com/pretty-link/

Vic- BusinessAccent July 13, 2009 at 6:38 am

This is a nice trick. I just bookmarked it. I will try it when I have time. I like it when you preserve your brand. Our branding is very important, and I was searching for that in shortening twitter URL without replacing your own domain name.

Vic- BusinessAccent’s last blog post: What is our greatest asset in life?

Debo Hobo July 13, 2009 at 6:46 am

See now that is cool and useful information!!! and of course as you planned I tweeted it! LOL:)

Debo Hobo’s last blog post: Money Matters: Get Paid To Travel-Freelance Writing

Greg Ellison July 13, 2009 at 6:47 am

This is a nice way of of doing it yourself instead of using a service like tweet this. Thanks Greg Ellison

Greg Ellison’s last blog post: Want to start a blog?

vaibhav July 13, 2009 at 8:00 am

For those uncomfortable with coding and editing. I guess wordpress has a plugin
short-url-plugin

vaibhav’s last blog post: How to hide all your secret files and folder behind an image?

Bradley Nordstrom July 13, 2009 at 8:12 am

gr8 post.Thanks for the interesting post.

Bradley Nordstrom’s last blog post: STARBUCKS MAKES MY LIFE PERFECT

EarningStep July 13, 2009 at 8:22 am

great tips here , i will try as fast as i can

Doug Dillard July 13, 2009 at 8:39 am

Thanks John! I totally forgot the default links still work after you change your permalinks to something more SEO friendly. Very useful tip :)

Doug Dillard’s last blog post: Do You Ever Get Distracted While Blogging?

Garzilla July 13, 2009 at 8:46 am

Thanks for the tip, I have not been happy not seeing my url on the tweet.

Chris Jacobson July 13, 2009 at 9:05 am

That’s a pretty cool idea, although my domain is much longer than Tiny URL to begin with. :p

Chris Jacobson’s last blog post: Sunday Chatter – 7/12

Tjen Penge Online - Mikkel Juhl July 13, 2009 at 9:25 am

Nice One!

But does it work if the custom structure is: /%postname%/? Now I don’t know .htaccess that well, but?

Does It?

Tjen Penge Online – Mikkel Juhl’s last blog post: Internet Marketing sjovt? Det kan du bande på!

John Chow July 13, 2009 at 9:50 am

Yes it does. That is how I have it set up. The short URL forwards to my custom one.

fas July 13, 2009 at 11:22 am

That is a very informative and easy to do thing. Thanks for sharing.

fas’s last blog post: Marketing Your Store On The Internet

James Hartje July 13, 2009 at 11:29 am

John how do you learn all this stuff, it take me forever to learn the basics

James Hartje’s last blog post: Stocks on Wall Street Additions: Personal Finance Section

John Chow July 14, 2009 at 6:04 pm

No matter how good you become, you must always be ready to learn and keep learning.

KIko July 13, 2009 at 12:56 pm

I just set it up for my friend’s blog, John. Thanks for the guide — quality content.

It took only a few minutes and it was much easier than I thought it would be.

Mastermind Marketing Strategies July 13, 2009 at 2:21 pm

As useful as this might be, it is still too much of a hussle.
TinyUrl and Bit.ly are yet to let me down so I’ll stick to the TweetMeMe plugin.

Igor

Mastermind Marketing Strategies’s last blog post: How To Make YouTube Videos That Sell

John Chow July 14, 2009 at 6:06 pm

It depends on how much your brand is worth to you. There’s a reason my facebook is at located at johnchow.com/facebook :)

danimg.co.cc - ad. free picture hosting July 13, 2009 at 3:16 pm

HeHe I see you’ve managed to do it then John ;)

james moralde July 13, 2009 at 8:13 pm

Ok, you actually made it look so easy. However, being not so technical, I am afraid to touch those htaccess files for fear I might cause havoc in my blog. Thus I looked for some plugin and found Blair’s pretty link plugin that actually makes it easy and safe to do just the thing, and more.

james moralde’s last blog post: Stephenie Meyer’s New Moon

bscene July 13, 2009 at 10:52 pm

saw you post this request on twitter last week … who eventually helped you figure it out?

John Chow July 14, 2009 at 6:08 pm

Someone on my IM list help me worked it out. A fellow tech site owner.

videostar July 14, 2009 at 3:19 am

I think I will be sticking with TweetMe plugin, does all I need!

videostar’s last blog post: Is It Still Worth Using Squidoo?

ZK @ Web Marketing Blog July 14, 2009 at 11:27 am

So we have seen another aspect of John. From where you have learn this

Will try to use this on my other blogs.

ZK @ Web Marketing Blog’s last blog post: How to make a Six Figure Blogging Income

EarningStep July 14, 2009 at 4:56 pm

it all sounds so simple, but I made the mistake of making some edits to my htaccess file last month and could not access my site at all after that. I ended up having to do a complete restore from backup. Be very careful with your edits!

John Chow July 14, 2009 at 6:15 pm

That’s why you must always back up you htaccess file before doing any editing!

Ben Pei July 15, 2009 at 12:49 am

I am sure your web host can do something about that for you!

Ben Pei’s last blog post: Pro Blogging Secrets™ Pre-Launch Notice

gurtey July 14, 2009 at 11:25 pm

man…that’s an awesome trick..thanks a lot!

gurtey’s last blog post: Tumblr launch

Bisnis Internet July 15, 2009 at 3:40 am

Thanks for the tips, i will try at my web..

vijju July 15, 2009 at 4:48 am

Your Message

vijju July 15, 2009 at 4:49 am

really wonderful. as you know johnchow do always wonderful things

vijju’s last blog post: Natural eczema Treatment – Four Drug Free Ideas

vijju July 15, 2009 at 5:13 am

thanks a lot for that awesome trick

vijju’s last blog post: Excema

Uncanny Blogger July 16, 2009 at 4:35 am

Aha, this is brilliant, I thought. So useful and with excellent instructions that even a luddite like me will be able to follow. But after an hour I have to give up. Sob. I did so well and managed to discover what my post number was (1499 would you believe it even though I’ve only written about 60 posts), but I simply cannot find my single.php file and when I just paste the code at the bottom of my post if gets corrupted when I save it. Please can you give me a clue about the whereabouts of the .php file I need? Sorry for being so slow!

Thanks, Annabel

Uncanny Blogger’s last blog post: Seven Reasons To Go For a Walk

John Chow July 18, 2009 at 11:29 pm

Some Wordpress Template don’t have a single.php file. It maybe call page.php. If you can’t find that then look at your index.php.

Free Arcade Games July 16, 2009 at 12:18 pm

Ever since Twitter popped up, people have been creating shortening sites here and there. There are domain extensions i have NEVER heard of!

-Mike

Free Arcade Games’s last blog post: Perfect Shot