Use Short URLs Without Losing the SEO Juice!

Ok, this post is going to get a little technical. It’s even going to include some open source code, which if you’re so inclined, you can use under the Creative Commons Public License. But before I bore you with the techical details, let’s talk a little about some interesting product trends that have really taken off lately, and why, if you’re not careful, you could end up shooting yourself in the foot.

Short URLs worth $46 Million?

You already know I’m a big fan of Twitter. Well, one of the interesting side effects of the rise of twitter is there has been a comparable rise in the use of URL shortening services like TinyURL. In fact the recent news that bit.ly raised a $2million A round suggests that venture money is even taking notice of these services. TechCrunch recently speculated that TinyURL, the dominant player in this space, could be worth as much as $46million dollars.

Why are services like TinyURL getting so much attention? Well, since Twitter limits posts to 140 characters, most users try to save as much space for content as they can, by using URL shortening services for any embedded links. Twitter will even automatically use TinyURL if your tweet includes long URLs.

Worth more, BUT Worthless for SEO

The problem with using these services is that your domain loses the SEO juice normally associated with inbound links. While it’s true that most links on Twitter pages are tagged as “nofollow” which limits their SEO power somewhat, one thing is certain, an link to tinyurl.com or bit.ly or any other url shortening service will never give you SEO juice. However, if you could include shortened url links to your own domain you have an opportunity to have that link copied and pasted around the internet giving you direct traffic and SEO link power to your domain.

So, hopefully I’ve convinced you that you don’t want to continue to give away links to generic URL shortening services, and you’re ready to tackle making your own URL shortener. Here’s where we’ll get a little more technical. If you’re not a developer, then have no fear, just take notes and send your dev team to come read the article and add url shortening to your product road map.

How to Build a URL Shortening Service

Developers, let’s talk design for a second. Assuming your building out your own web property and you’ve done some integration with Twitter, Facebook, or other social networking platforms, then you’re probably already familiar with the APIs available from services like TinyURL to post URLs and get back shortened forms.

These services have a much more challenging problem then you do. They need to shorten URLs from an infinite number of domains, and more importantly they need to support arbitrary resources from those domains. Granted, its not too hard to implement a solution for this, you can basically hash the URL into a sufficiently sparce id space and get a unique idenitfier for each URL. A truncated MD5 hash is probably a good solution. Then store the hash in a database, and whenever someone requests the shortened URL you can do a lookup and return the correct long URL from the database.

There are some great services out there that have taken this idea to the next level, and even include analytics, click through tracking, toolbars that frame the content and allow comments, bells and whistles galore. But what they make up from is splash they sacrafice in SEO juice and direct references to your domain. And so you’ll want a solution you can host off your domain.

TinyDIY

In all likelihood, you’re content is probably database driven already, and so each potential URL is probably already associated with some unique asset ID. So instead of implementing a one-way database based solution that maps arbitrary URLs into short URLs, you could implement a solution that maps your asset IDs into short URLs.

For example, let’s say you wanted to do this for a WordPress blog, or even a WordPressMU blog network. Since Sweat365.com is based on the WordPressMU core, we developed a solution that allows us to map any blog post in our network onto a shortened URL in our domain.

Our goal was to implement a solution that wouldn’t require a new database table mapping between short and long URLs.  We wanted a two way programatic solution, so that we could map to and from shortened andlong URLs with only the characters of the URL. Since we already had asset IDs to work with (in this case a blog_id and a post_id) we could map those IDs into a compressed form like a base46 encoding.

base46, You mean base64? No, actually base35!

What do I mean by base 46? Well imagine a numerical set that is made up of all the digits 0-9, all of the alpha characters a-z, and the 10 URL safe characters: “$-_.!*’(),” allowed by RFC 1738 (the URL spec). If you used those characters as digits for your encoding, then you’d have 46 characters to work with, and you’d be able to encode your asset IDs in base 46. It’s a pretty good system as, the asset ID 9,999,999,999 would be shortened to “f’*ip21″ and so most platforms could save a lot of space on URLs.

There are a couple of gotchas though. First of all, you might want to think about what happens when an asset ID like 1973507, 60546, or 2861642 randomly pops up and your encoded url ends up with words that might be considered offensive. I’ll go ahead and let you figure out what those IDs would encode into, but suffice to say, we wanted to protect against that. One solution, which we ended up choosing, is to simply remove the vowels from the allowed character set. It’s pretty hard to come up with randomly generated dirty words if you have no vowels to work with.

The second problem you might notice is that even though $-_.!*’() and , are allowed in URLs, they are rarely used and as such both Twitter and Facebook get confused when they see these characters in a web url, and they will truncate the link at the character that confuses them. Through testing we determined that ‘-’ ‘_’ and ‘.’ are really the only special characters that Twitter and Facebook allow in URLs.

So, if you just use the digits, the consonants, and the characters ‘-’ ‘_’ and ‘.’, you end up with 35 characters to work with. And as a result, you can encode your asset IDs in base 35. Now, 9,999,999,999 becomes “sb5.fh5″, which is still pretty short, and certainly moves you toward your URL shortening goal!

Quit Your Jibber Jabber, Give Me Some Code, Fool!

Ok, ok, so here’s a link to a WordPressMu plugin that will do URL shortening in base35. There are a couple important caveats. First of all, it’s only designed to work in WordPressMU, not WordPress. Second, it’s only designed to work in WPmu running in VHOST mode. And finally, this code is licensed under the Create Commons, Attribution-NonCommercial-ShareAlike 3.0 Unported, license, and so what that means is that you are free to use this for non-commercial purposes under the following restrictions: you must attribute the work in the manner specified by the licensor, you may not use this work for commercial purposes, if you alter, transform, or build upon this work, you may distribute  the resulting work only under the same or similar license to this one,  and for any reuse or distribution, you must make clear to others the license terms of this work.

The code is pretty self explanatory, but it’s also got tons of comments. Out of the box it will trap and redirect any shortened URLs that reach your server. In order to encode long URLs into shorter ones, you should can call either kmxt_url_to_shorturl($url) or kmxt_shorturl_from_ids($blog_id,$post_id) from somewhere else in your WordPress code. For example, if you’ve implemented a twitter auto-tweeting plugin, you could replace your calls to TinyURL with a call to this shortener.

Good luck and Happy URL Shortening!

Twitter and Facebook - Very Different Vehicles

I often hear people ask “What’s the deal with Twitter? Isn’t that just like the Status feed feature of Facebook? Isn’t it just a feature?” On the surface this may seem to be the case. Twitter’s main purpose and functionality is indeed a micro-blogging feed, much like Facebook’s status feature.

But comparing Twitter to Facebook status because the are both micro-blogging platforms is a little like comparing UPS Trucks to Taxis because they are both automobiles.

Facebook and Twitter are different not because of their features, but because of how people use them. Specifically, they are different because of the differences in how people manage their social networks on Twitter and Facebook. Understanding this difference is critical to your effective use of both as a marketing or professional networking tool. I’ve also talked about how important it is for technology startups to think about how they can leverage these platforms to help virally spread awareness of their product. In order to successfully develop a viral strategy around these platforms, you have to understand how people use them.

The vast majority of Facebook users treat their friends list as a narrowly scoped list of people they know in the “real world”. They are their school friends, their work colleagues, their family members. They have a prior connection with the person in the off-line world, and they’ve extended that connection into the online world. There’s nothing wrong with this use of a social network, in fact many people would argue this is the point behind social networks. But this is very different from how most people use Twitter.

Users of Twitter tend to be much more generous in making connections with people they’ve never met in the “off-line” world. This isn’t to say that the connections made on Twitter aren’t as substantive as those from prior off-line relationships. It’s not lesser or greater, just different. I suspect this difference is primarily due to two distinctions. First of all the “creation myth” of these platforms are very different.

Facebook (as the name implies) was created to emulate the social network of a college yearbook, it was designed around personal connections at school. Twitter was created around the idea of highly wired/connection people who needed to communicate in real time with larger groups of people.

Beyond just the creation myth, these products have slightly different features that make social network growth and expansion operate very differently. One encourages public dialogs and broad reaching nets of friends, while the other makes it easy to find real people you know from the real world.

Twitter for example allows you to have unidirectional follow/following relationships, follow/following lists are public, and by default tweets are either broadcasts or narrowly scoped to an individual recipient, but still presented in the public forum. Facebook on the other hand has tools for quickly finding people by name, location, and association that you’ve already indicated your affiliation with. Facebook has a plethora of features to dial in the scope of a dialog to one, several, or all of your friends.

So what? How does this effect me? It’s important to understand these differences in order to understand how to utilize these platforms. How should this awareness effect product integration? How would it effect using these platforms as broadcast mediums for things like product launches? In upcoming posts I will talk about how these differences can and should inform your strategies for using these platforms. Stay tuned.

Don’t Let Twitter Pass Your Startup By!

Hitwise, recently released details about Twitters amazing growth, and it appears as if twitter has now surpassed Digg to rank #84 in Hitwise’s list.

If you’re a media start up which has been executing a “social networking” strategy around Digg, StumbleUpon, and other user meta filters, but you haven’t yet embraced Twitter, you’re about to start falling behind.

It’s time to start paying attention!

Some interesting details in the report include:

  • Twitters traffic from users aged 25-34, went from 12% a year ago to 45% today.

  • Digg gets nearly 38.8% of it’s traffic from organic search on Google. Twitter however gets only 9.23% of its traffic from search, and instead gets most of it’s traffic from social networks and other web applications that integrate Twitters APIs. Traffic from Facebook and MySpace combined are almost double the traffic Twitter gets from Google.

  • Also worth noting is that Hitwise’s report only tracks web traffic, and therefore misses all of the twitter traffic which comes from mobile applications.

Why Your Startup Can’t Afford To Hire a CTO

Before Founding Konamoxt, my last gig was the Chief Technology Officer for a local Seattle Startup. I have the classic resume for a CTO of a Startup company… if you’re trying to hire a CTO, I’m sure your recruiter has called me… I get those calls all the time. Mr. Startup CEO, I’m here to tell you, you can’t afford to hire a CTO.

[Note to tech managers and wannabe CTOs out there: Oh, don't worry guys my next post will be why you can't afford to not hire a CTO.]

Today, one of the many things I do as an entrepreneur is help advise other Startup companies. I’m on the Board of Advisers of several other startup companies in the Seattle area. One of the common requests I get as an adviser is the help interview and vet potential development leadership candidates.

Inevitably someone on the management team will say “What we need is a CTO! Can you help us make sure this candidate would make a good CTO?”

Whenever I hear this, my alarm bells go off. Do they really need a CTO? What is happening in the organization that causes them to think they need a CTO? And maybe more importantly what do you think you get when you hire a CTO?

Most of the time, a startup CEO (or more likely the Board of Directors) will decide he or she needs a CTO because the organization is feeling pressure about the product. Maybe the schedule has slipped, maybe the product is buggy, maybe they just have this feeling that something isn’t working right. This usually happens in the case where the CEO is not technical themselves. That CEO/Founder was very likely the product visionary, but they don’t know how to build a product, write code, or lead an engineering organization to build the product.

Another very common situation is when outsiders, often the Board, is frustrated with the overall performance of the business, and they begin looking for “problems”. Unless one of the founders has a past track record of being a CTO or VP Engineering in a larger organizations, this lack of experience will often be blamed for the frustration without much analysis at all of the actual facts on the ground.

Sometimes, this “gut reaction” is correct. Sometimes the engineering organization is indeed rudderless, and the right solution is a new technology leader joining the team. But more often then not, I’ve seen the non-technical leadership jump to the conclusion that new “experienced” blood is what’s needed. When in many cases, that move can actually be counter productive.

The common euphemism seems to be “We need some adult supervision in here!”

But if you’re looking to hire a CTO, you probably already have your engineering team in place, you may already have a team of engineers that are building and have built something. How have they gotten as far as they have without this “technical leadership” you’re so convinced is missing? Nine times out of ten, the CEO has become convinced that the existing team is just lacking that leadership.

That search inevitably begins like this… “Let’s find someone with years of experience. And since this company is gonna be huge, we need someone who’s managed big teams, someone who can take us all the way to going public! We’re going to be a $100m/year business with hundreds of developers in different divisions. We need the kind of leader who’s been there and done that.” Sounds like a job for a CTO, right?

Hiring that CTO, will be the biggest mistake you make. You’ll alienate your engineering team, you’ll waste your money, you won’t be satisfied with the results, and in all likelihood that CTO won’t last in your organization anyway.

Here’s the problem… 99% of the time “that guy” you think matches your wish list, hasn’t written code in years. He might have managed a 1,000 developer organization, but he hasn’t directly managed engineers in years. She looks great on paper, managed a 10,000 cpu data center processing billions of transactions a day… but she hasn’t ever done anything with cloud computing.

When ever I’m confronted with this dilemma as an adviser I’m reminded of a great quote I once heard about NASCAR, I believe it was the late great Dale Earnhardt that said…

“If you see a wreck in front of you, drive toward it, because by the time you get there, it won’t be there!”

This philosophy can apply to a lot of things about startups. The key to applying this quote is to recognize that things are always changing… and if you continue to move forward, then in the future you’re guaranteed to be someplace other than where you are right now. What looks like a disaster in front of you if you stay on course, may in fact be the best, safest, fastest, game winning decision by the time you actually get there.

How does this apply to searching for a CTO? Well, it may be the case that you already have your CTO on your team. You don’t recoginze them yet, because they haven’t yet managed that 100 person development team. That doesn’t mean they won’t be ready when the time comes. You probably only have 3 to 6 developers right now. And even though you don’t think you have a development manager, doesn’t mean that team doesn’t have a leader.

Sure, it’s possible your team has gotten as far as they have with no leadership… maybe as the CEO you’ve been guiding that product vision and you’ve been managing those developers. But unless you speak their language, because you’ve sat in their chair before… then I’d be willing to bet you that one of your developers is actually leading the team while you’re not there. Maybe it’s the most senior developer, or maybe its just the most passionate and sharpest developer.

Instead of hiring an outside CTO, you probably need to take a close look at your team and try to determine if you already have a CTO working for you… but under a different title.

Next post… Why Your Startup Can’t Afford To NOT Hire a CTO